Skip to content

Commit

Permalink
Adds test case for #6846. (#8729)
Browse files Browse the repository at this point in the history
  • Loading branch information
dom96 authored and Araq committed Aug 23, 2018
1 parent 8aae5c9 commit 07e1da8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/async/t6846.nim
Original file line number Diff line number Diff line change
@@ -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 07e1da8

Please sign in to comment.