new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
18
tests/openarray/topenlen.nim
Normal file
18
tests/openarray/topenlen.nim
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
discard """
|
||||
file: "topenlen.nim"
|
||||
output: "7"
|
||||
"""
|
||||
# Tests a special bug
|
||||
|
||||
proc choose(b: openArray[string]): string = return b[0]
|
||||
|
||||
proc p(a, b: openarray[string]): int =
|
||||
result = a.len + b.len - 1
|
||||
for j in 0 .. a.len: inc(result)
|
||||
discard choose(a)
|
||||
discard choose(b)
|
||||
|
||||
discard choose(["sh", "-c", $p([""], ["a"])])
|
||||
echo($p(["", "ha", "abc"], ["xyz"])) #OUT 7
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue