summary refs log tree commit diff stats
path: root/tests/tester.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-08-20 01:13:13 +0200
committerAraq <rumpf_a@web.de>2012-08-20 01:13:13 +0200
commit5e15dec1757e6013cbeb5d6baf9d9579cf025361 (patch)
tree2157b7f03f5f596060ad9ed52427118964912e50 /tests/tester.nim
parent0cac8d9b6fa2c982468899db109a964df979b186 (diff)
downloadNim-5e15dec1757e6013cbeb5d6baf9d9579cf025361.tar.gz
first steps to make templates hygienic
Diffstat (limited to 'tests/tester.nim')
-rwxr-xr-xtests/tester.nim7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/tester.nim b/tests/tester.nim
index 725e76ead..8c9f7f782 100755
--- a/tests/tester.nim
+++ b/tests/tester.nim
@@ -62,12 +62,15 @@ proc extractSpec(filename: string): string =
     #echo "warning: file does not contain spec: " & filename
     result = ""
 
+when not defined(nimhygiene):
+  {.pragma: inject.}
+
 template parseSpecAux(fillResult: stmt) =
   var ss = newStringStream(extractSpec(filename))
-  var p: TCfgParser
+  var p {.inject.}: TCfgParser
   open(p, ss, filename, 1)
   while true:
-    var e = next(p)
+    var e {.inject.} = next(p)
     case e.kind
     of cfgEof: break
     of cfgSectionStart, cfgOption, cfgError: