summary refs log tree commit diff stats
path: root/tests/patterns/tstmtlist.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/patterns/tstmtlist.nim')
-rw-r--r--tests/patterns/tstmtlist.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/patterns/tstmtlist.nim b/tests/patterns/tstmtlist.nim
new file mode 100644
index 000000000..391c93d47
--- /dev/null
+++ b/tests/patterns/tstmtlist.nim
@@ -0,0 +1,18 @@
+discard """
+  output: '''0
+|12|34
+'''
+"""
+
+template optWrite{
+  write(stdout, x)
+  write(stdout, y)
+}(x, y: string) =
+  write(stdout, "|", x, y, "|")
+
+if true:
+  echo "0"
+  write stdout, "1"
+  write stdout, "2"
+  write stdout, "3"
+  echo "4"