diff options
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/tcgi.nim | 6 | ||||
-rw-r--r-- | tests/stdlib/tfdleak.nim | 1 | ||||
-rw-r--r-- | tests/stdlib/tfdleak_multiple.nim | 4 | ||||
-rw-r--r-- | tests/stdlib/tmarshal.nim | 5 | ||||
-rw-r--r-- | tests/stdlib/tnetbind.nim | 10 | ||||
-rw-r--r-- | tests/stdlib/tosproc.nim | 9 | ||||
-rw-r--r-- | tests/stdlib/trst.nim | 6 | ||||
-rw-r--r-- | tests/stdlib/tstrutil.nim | 10 |
8 files changed, 44 insertions, 7 deletions
diff --git a/tests/stdlib/tcgi.nim b/tests/stdlib/tcgi.nim index bc177125e..7df1b077d 100644 --- a/tests/stdlib/tcgi.nim +++ b/tests/stdlib/tcgi.nim @@ -1,3 +1,9 @@ +discard """ + output: ''' +[Suite] Test cgi module +''' +""" + import unittest import cgi, strtabs diff --git a/tests/stdlib/tfdleak.nim b/tests/stdlib/tfdleak.nim index 5931be8c1..79d7ee0d0 100644 --- a/tests/stdlib/tfdleak.nim +++ b/tests/stdlib/tfdleak.nim @@ -2,6 +2,7 @@ discard """ exitcode: 0 output: "" matrix: "; -d:nimInheritHandles" + joinable: false """ import os, osproc, strutils, nativesockets, net, selectors, memfiles, diff --git a/tests/stdlib/tfdleak_multiple.nim b/tests/stdlib/tfdleak_multiple.nim index 75c4c0503..22387607f 100644 --- a/tests/stdlib/tfdleak_multiple.nim +++ b/tests/stdlib/tfdleak_multiple.nim @@ -1,3 +1,7 @@ +discard """ +joinable: false +""" + import os, osproc, strutils const Iterations = 200 diff --git a/tests/stdlib/tmarshal.nim b/tests/stdlib/tmarshal.nim index a6fc6c1a5..118d0ae02 100644 --- a/tests/stdlib/tmarshal.nim +++ b/tests/stdlib/tmarshal.nim @@ -5,8 +5,13 @@ true alpha 100 omega 200 ''' +joinable: false """ +#[ +joinable: false pending https://github.com/nim-lang/Nim/issues/9754 +]# + import marshal template testit(x) = discard $$to[type(x)]($$x) diff --git a/tests/stdlib/tnetbind.nim b/tests/stdlib/tnetbind.nim index b2bcf4b05..734b6c5e7 100644 --- a/tests/stdlib/tnetbind.nim +++ b/tests/stdlib/tnetbind.nim @@ -1,3 +1,13 @@ +discard """ +joinable: false +""" + +#[ +joinable: false +otherwise: +Error: unhandled exception: Address already in use [OSError] +]# + import net ## Test for net.bindAddr diff --git a/tests/stdlib/tosproc.nim b/tests/stdlib/tosproc.nim index b5328c9eb..cb6e260c5 100644 --- a/tests/stdlib/tosproc.nim +++ b/tests/stdlib/tosproc.nim @@ -1,4 +1,11 @@ -# test the osproc module +discard """ +joinable: false +""" + +#[ +joinable: false +because it'd need cleanup up stdout +]# import stdtest/[specialpaths, unittest_light] diff --git a/tests/stdlib/trst.nim b/tests/stdlib/trst.nim index 6b1bd6897..797010a22 100644 --- a/tests/stdlib/trst.nim +++ b/tests/stdlib/trst.nim @@ -1,3 +1,9 @@ +discard """ + output: ''' +[Suite] RST include directive +''' +""" + # tests for rst module import ../../lib/packages/docutils/rstgen diff --git a/tests/stdlib/tstrutil.nim b/tests/stdlib/tstrutil.nim index cb6985a6e..5702b7341 100644 --- a/tests/stdlib/tstrutil.nim +++ b/tests/stdlib/tstrutil.nim @@ -1,6 +1,3 @@ -discard """ - output: "ha/home/a1xyz/usr/bin" -""" # test the new strutils module import @@ -15,7 +12,7 @@ template rejectParse(e) = except ValueError: discard proc testStrip() = - write(stdout, strip(" ha ")) + doAssert strip(" ha ") == "ha" proc testRemoveSuffix = var s = "hello\n\r" @@ -143,8 +140,9 @@ proc main() = testStrip() testRemoveSuffix() testRemovePrefix() - for p in split("/home/a1:xyz:/usr/bin", {':'}): - write(stdout, p) + var ret: seq[string] # or use `toSeq` + for p in split("/home/a1:xyz:/usr/bin", {':'}): ret.add p + doAssert ret == @["/home/a1", "xyz", "/usr/bin"] proc testDelete = var s = "0123456789ABCDEFGH" |