* fix #15148

Co-authored-by: alaviss <leorize+oss@disroot.org>
This commit is contained in:
flywind 2020-08-08 13:24:54 +08:00 • committed by GitHub
commit eee3b189ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 4 deletions

12
tests/async/t15148.nim Normal file
View file

@ -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()