mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 18:34:43 +00:00
Add test for issue #4757
This commit is contained in:
16
tests/async/tasyncsend4757.nim
Normal file
16
tests/async/tasyncsend4757.nim
Normal file
@@ -0,0 +1,16 @@
|
||||
discard """
|
||||
file: "tasyncsend4754.nim"
|
||||
output: "Finished"
|
||||
"""
|
||||
|
||||
import asyncdispatch
|
||||
|
||||
proc f(): Future[void] {.async.} =
|
||||
let s = newAsyncNativeSocket()
|
||||
await s.connect("example.com", 80.Port)
|
||||
await s.send("123")
|
||||
echo "Finished"
|
||||
|
||||
asyncCheck f()
|
||||
|
||||
poll(1000)
|
||||
Reference in New Issue
Block a user