summary refs log tree commit diff stats
path: root/lib/pure/xmlparser.nim
diff options
context:
space:
mode:
authorOleh Prypin <blaxpirit@gmail.com>2015-04-21 14:37:29 +0300
committerOleh Prypin <blaxpirit@gmail.com>2015-04-21 14:37:29 +0300
commit32109a7867b06cdf9e66ad717f42aebb3e0fcaa4 (patch)
tree6d36a5dfe0007bc7529aeda7acf18bd3c29257ee /lib/pure/xmlparser.nim
parentd203d6fad44547d2291e33712057d154e18c0361 (diff)
downloadNim-32109a7867b06cdf9e66ad717f42aebb3e0fcaa4.tar.gz
Don't run non-test code when defined(testing)
Diffstat (limited to 'lib/pure/xmlparser.nim')
-rw-r--r--lib/pure/xmlparser.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/xmlparser.nim b/lib/pure/xmlparser.nim
index 755bfcdbc..840cae734 100644
--- a/lib/pure/xmlparser.nim
+++ b/lib/pure/xmlparser.nim
@@ -143,7 +143,7 @@ proc loadXml*(path: string): XmlNode =
   result = loadXml(path, errors)
   if errors.len > 0: raiseInvalidXml(errors)
 
-when isMainModule:
+when not defined(testing) and isMainModule:
   import os
 
   var errors: seq[string] = @[]