summary refs log tree commit diff stats
path: root/tests/async/t6846.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/async/t6846.nim')
-rw-r--r--tests/async/t6846.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/async/t6846.nim b/tests/async/t6846.nim
new file mode 100644
index 000000000..7fe38f3b3
--- /dev/null
+++ b/tests/async/t6846.nim
@@ -0,0 +1,15 @@
+discard """
+  exitcode: 0
+  output: "hello world"
+  disabled: windows
+"""
+
+import asyncdispatch
+import asyncfile
+
+var asyncStdout = 1.AsyncFD.newAsyncFile()
+proc doStuff: Future[void] {.async.} =
+  await asyncStdout.write "hello world\n"
+
+let fut = doStuff()
+doAssert fut.finished, "Poll is needed unnecessarily. See #6846."