diff options
Diffstat (limited to 'tests/run/topenlen.nim')
-rwxr-xr-x | tests/run/topenlen.nim | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/run/topenlen.nim b/tests/run/topenlen.nim deleted file mode 100755 index fec8e87b7..000000000 --- a/tests/run/topenlen.nim +++ /dev/null @@ -1,18 +0,0 @@ -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 - - |