diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-09-05 17:36:16 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2014-09-05 17:36:16 +0100 |
commit | 0f3025e320f5d7dc960d6464b8b32b5bc4e1c9dd (patch) | |
tree | 79225d28ed563f1d420a57017908773f968da469 /tests/async | |
parent | 5fb12144b31a97fd208fb286de557f913b97e108 (diff) | |
download | Nim-0f3025e320f5d7dc960d6464b8b32b5bc4e1c9dd.tar.gz |
Added Windows asyncfile implementation.
Diffstat (limited to 'tests/async')
-rw-r--r-- | tests/async/tasyncfile.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/async/tasyncfile.nim b/tests/async/tasyncfile.nim new file mode 100644 index 000000000..9433f07ff --- /dev/null +++ b/tests/async/tasyncfile.nim @@ -0,0 +1,14 @@ +discard """ + file: "tasyncexceptions.nim" + exitcode: 0 +""" +import asyncfile, asyncdispatch, os + +proc main() {.async.} = + var file = openAsync(getTempDir() / "foobar.txt", fmReadWrite) + await file.write("test") + file.setFilePos(0) + let data = await file.readAll() + doAssert data == "test" + +waitFor main() |