require errormsg to be specified before file.
This commit is contained in:
parent
ca394ebd95
commit
1105d03644
264 changed files with 305 additions and 623 deletions
|
|
@ -1,7 +1,3 @@
|
|||
discard """
|
||||
file: "t7758.nim"
|
||||
exitcode: 0
|
||||
"""
|
||||
import asyncdispatch
|
||||
|
||||
proc task() {.async.} =
|
||||
|
|
@ -16,4 +12,4 @@ proc main() =
|
|||
|
||||
doAssert counter <= 4
|
||||
|
||||
for i in 0 .. 10: main()
|
||||
for i in 0 .. 10: main()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
discard """
|
||||
file: "tasyncRecvLine.nim"
|
||||
output: '''
|
||||
output: '''
|
||||
Hello World
|
||||
Hello World
|
||||
'''
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
errormsg: "'anotherGCSafeAsyncProcIter' is not GC-safe as it calls 'asyncGCUnsafeProc'"
|
||||
cmd: "nim c --threads:on $file"
|
||||
file: "asyncmacro.nim"
|
||||
errormsg: "'anotherGCSafeAsyncProcIter' is not GC-safe as it calls 'asyncGCUnsafeProc'"
|
||||
"""
|
||||
|
||||
assert compileOption("threads"), "this test will not do anything useful without --threads:on"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "tasyncall.nim"
|
||||
exitcode: 0
|
||||
"""
|
||||
import times, sequtils
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "tasyncawait.nim"
|
||||
output: "5000"
|
||||
"""
|
||||
import asyncdispatch, nativesockets, net, strutils, os
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
discard """
|
||||
file: "tasyncconnect.nim"
|
||||
exitcode: 1
|
||||
outputsub: "Error: unhandled exception: Connection refused"
|
||||
exitcode: 1
|
||||
"""
|
||||
|
||||
import
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "tasyncdial.nim"
|
||||
output: '''
|
||||
OK AF_INET
|
||||
OK AF_INET6
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
discard """
|
||||
file: "tasyncexceptions.nim"
|
||||
exitcode: 1
|
||||
outputsub: "Error: unhandled exception: foobar"
|
||||
exitcode: 1
|
||||
"""
|
||||
import asyncdispatch
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
discard """
|
||||
output: '''13
|
||||
output: '''
|
||||
13
|
||||
hello humans!
|
||||
13
|
||||
'''
|
||||
file: "tasyncfile.nim"
|
||||
exitcode: 0
|
||||
"""
|
||||
import asyncfile, asyncdispatch, os
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
discard """
|
||||
file: "tasyncrecursion.nim"
|
||||
output: "50005000"
|
||||
output: "50005000"
|
||||
"""
|
||||
import asyncdispatch
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
discard """
|
||||
file: "tasyncsend4754.nim"
|
||||
output: "Finished"
|
||||
output: "Finished"
|
||||
"""
|
||||
|
||||
import asyncdispatch, asyncnet
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "tasyncssl.nim"
|
||||
cmd: "nim $target --hints:on --define:ssl $options $file"
|
||||
output: "500"
|
||||
disabled: "windows"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
discard """
|
||||
file: "tasynctry.nim"
|
||||
exitcode: 0
|
||||
output: '''
|
||||
output: '''
|
||||
Generic except: Test
|
||||
Specific except
|
||||
Multiple idents in except
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
discard """
|
||||
file: "tawaitsemantics.nim"
|
||||
exitcode: 0
|
||||
output: '''
|
||||
output: '''
|
||||
Error can be caught using yield
|
||||
Infix `or` raises
|
||||
Infix `and` raises
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
discard """
|
||||
file: "tfuturestream.nim"
|
||||
exitcode: 0
|
||||
output: '''
|
||||
output: '''
|
||||
0
|
||||
1
|
||||
2
|
||||
|
|
@ -70,4 +68,4 @@ waitFor testCompletion()
|
|||
|
||||
# echo("Finished")
|
||||
|
||||
# waitFor omega()
|
||||
# waitFor omega()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "tioselectors.nim"
|
||||
output: "All tests passed!"
|
||||
"""
|
||||
import selectors
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "tnewasyncudp.nim"
|
||||
output: "5000"
|
||||
"""
|
||||
import asyncdispatch, nativesockets, net, strutils, os
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
discard """
|
||||
file: "tpendingcheck.nim"
|
||||
exitcode: 0
|
||||
output: ""
|
||||
"""
|
||||
|
||||
|
|
@ -18,4 +16,3 @@ while not f.finished:
|
|||
f.read
|
||||
|
||||
doAssert(not hasPendingOperations())
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "twinasyncrw.nim"
|
||||
output: "5000"
|
||||
"""
|
||||
when defined(windows):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue