This commit is contained in:
Arne Döring 2019-08-31 19:32:59 +02:00 • committed by Andreas Rumpf
commit 6e01be34ef
3 changed files with 38 additions and 1 deletions

View file

@ -0,0 +1,22 @@
discard """
cmd: "nim e $file"
output: '''
foobar
nothing
hallo
"""
# this test ensures that the mode is resetted correctly to repr
import macros
macro foobar(): void =
result = newCall(bindSym"echo", newLit("nothing"))
echo "foobar"
let x = 123
foobar()
exec "echo hallo"