diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-08-31 19:32:59 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-08-31 19:32:59 +0200 |
commit | 6e01be34efd60869c7905b1effcc47880cedfb6d (patch) | |
tree | 02fe3dd7f7d43215ffea7e0aef138db5852ae8e2 /tests/tools | |
parent | 326a333c8b85d4cb0a8332e8ce292bf7bf296104 (diff) | |
download | Nim-6e01be34efd60869c7905b1effcc47880cedfb6d.tar.gz |
fixes #11903 (#11908)
Diffstat (limited to 'tests/tools')
-rw-r--r-- | tests/tools/tnimscriptwithmacro.nims | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/tools/tnimscriptwithmacro.nims b/tests/tools/tnimscriptwithmacro.nims new file mode 100644 index 000000000..8b97f0769 --- /dev/null +++ b/tests/tools/tnimscriptwithmacro.nims @@ -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" |