From b97d603cd00a210547bda1a2a1c3e09f97fcc49e Mon Sep 17 00:00:00 2001 From: metagn Date: Tue, 6 Jun 2023 07:54:07 +0300 Subject: some test cleanups & category reorganization (#22010) * clean up some test categories * mention exact slice issue * magics into system * move trangechecks into overflow * move tmemory to system * try fix CI * try fix CI * final CI fix --- tests/msgs/texpandmacro.nim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/msgs/texpandmacro.nim (limited to 'tests/msgs/texpandmacro.nim') diff --git a/tests/msgs/texpandmacro.nim b/tests/msgs/texpandmacro.nim new file mode 100644 index 000000000..fea8b571f --- /dev/null +++ b/tests/msgs/texpandmacro.nim @@ -0,0 +1,18 @@ +discard """ + cmd: "nim c --expandMacro:foo $file" + nimout: '''texpandmacro.nim(17, 1) Hint: expanded macro: +echo ["injected echo"] +var x = 4 [ExpandMacro] +''' + output: '''injected echo''' +""" + +import macros + +macro foo(x: untyped): untyped = + result = quote do: + echo "injected echo" + `x` + +foo: + var x = 4 -- cgit 1.4.1-2-gfad0