Skip to content

Commit

Permalink
Adds test case for #6846.
Browse files Browse the repository at this point in the history
  • Loading branch information
dom96 committed Aug 23, 2018
1 parent 7dcf435 commit 5ae6cf6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/async/t6846.nim
@@ -0,0 +1,16 @@
discard """
exitcode: 0
output: "hello world"
disabled: windows
"""

import asyncdispatch
import asyncfile
import times

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."

0 comments on commit 5ae6cf6

Please sign in to comment.