summary refs log tree commit diff stats
path: root/tests/async
diff options
context:
space:
mode:
authorflywind <43030857+xflywind@users.noreply.github.com>2020-08-08 13:24:54 +0800
committerGitHub <noreply@github.com>2020-08-08 07:24:54 +0200
commiteee3b189ff867c0149434e198e89802eca4920ce (patch)
treeef358d59c4c4972155854d359c217cc179a0992c /tests/async
parent6f482ab9346230f8e9c24f71091bcd5ca2cb41f8 (diff)
downloadNim-eee3b189ff867c0149434e198e89802eca4920ce.tar.gz
fix #15148 (#15149)
* fix #15148

Co-authored-by: alaviss <leorize+oss@disroot.org>
Diffstat (limited to 'tests/async')
-rw-r--r--tests/async/t15148.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/async/t15148.nim b/tests/async/t15148.nim
new file mode 100644
index 000000000..ba14c1157
--- /dev/null
+++ b/tests/async/t15148.nim
@@ -0,0 +1,12 @@
+import asyncdispatch, asyncfile, os
+
+const Filename = "t15148.txt"
+
+proc saveEmpty() {.async.} =
+  let
+    text = ""
+    file = openAsync(Filename, fmWrite)
+  await file.write(text)
+  file.close()
+
+waitFor saveEmpty()