make tests/stdlib tests joinable (#14626)
* make tests/stdlib tests joinable * fixup
This commit is contained in:
parent
d51beb7b20
commit
49033eb531
9 changed files with 64 additions and 20 deletions
|
|
@ -1,3 +1,9 @@
|
|||
discard """
|
||||
output: '''
|
||||
[Suite] Test cgi module
|
||||
'''
|
||||
"""
|
||||
|
||||
import unittest
|
||||
import cgi, strtabs
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ discard """
|
|||
exitcode: 0
|
||||
output: ""
|
||||
matrix: "; -d:nimInheritHandles"
|
||||
joinable: false
|
||||
"""
|
||||
|
||||
import os, osproc, strutils, nativesockets, net, selectors, memfiles,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
discard """
|
||||
joinable: false
|
||||
"""
|
||||
|
||||
import os, osproc, strutils
|
||||
|
||||
const Iterations = 200
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,13 @@
|
|||
discard """
|
||||
joinable: false
|
||||
"""
|
||||
|
||||
#[
|
||||
joinable: false
|
||||
otherwise:
|
||||
Error: unhandled exception: Address already in use [OSError]
|
||||
]#
|
||||
|
||||
import net
|
||||
|
||||
## Test for net.bindAddr
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
discard """
|
||||
output: '''
|
||||
[Suite] RST include directive
|
||||
'''
|
||||
"""
|
||||
|
||||
# tests for rst module
|
||||
|
||||
import ../../lib/packages/docutils/rstgen
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue