fixes #7347, asyncfile.getFileSize (#7354)

* fixes #7347

* fixes #7347
This commit is contained in:
andri lim 2018-03-17 22:21:22 +07:00 • committed by Dominik Picheta
commit 19164929ed
3 changed files with 16 additions and 0 deletions

View file

@ -1,4 +1,8 @@
discard """
output: '''13
hello humans!
13
'''
file: "tasyncfile.nim"
exitcode: 0
"""
@ -48,5 +52,12 @@ proc main() {.async.} =
doAssert data == "t3"
file.close()
# Issue #7347
block:
let appDir = getAppDir()
var file = openAsync(appDir & DirSep & "hello.txt")
echo file.getFileSize()
echo await file.readAll()
echo file.getFilePos()
waitFor main()