diff options
Diffstat (limited to 'tests/stdlib/trepr.nim')
-rw-r--r-- | tests/stdlib/trepr.nim | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/tests/stdlib/trepr.nim b/tests/stdlib/trepr.nim index c85ae2b2a..3956b98f9 100644 --- a/tests/stdlib/trepr.nim +++ b/tests/stdlib/trepr.nim @@ -1,6 +1,6 @@ discard """ targets: "c cpp js" - matrix: ";--gc:arc" + matrix: "--mm:refc;--mm:arc" """ # if excessive, could remove 'cpp' from targets @@ -40,7 +40,7 @@ template main() = #[ BUG: --gc:arc returns `"abc"` - regular gc returns with address, e.g. 0x1068aae60"abc", but only + regular gc returns with address, e.g. 0x1068aae60"abc", but only for c,cpp backends (not js, vm) ]# block: @@ -271,5 +271,58 @@ func fn2(): int = ## comment result = 1""" + block: # block calls + let a = deb: + foo(a, b, (c, d)): + e + f + do: g + of h: i + elif j: k + except m: n + do () -> u: v + finally: o + + a + b: + c + d + do: + e + f + else: g + + *a: b + do: c + + doAssert a == """foo(a, b, (c, d)): + e + f +do: + g +of h: + i +elif j: + k +except m: + n +do -> u: + v +finally: + o +a + b: + c + d +do: + e + f +else: + g +*a: + b +do: + c""" + + doAssert repr(1..2) == "1 .. 2" + static: main() main() |