From 32109a7867b06cdf9e66ad717f42aebb3e0fcaa4 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Tue, 21 Apr 2015 14:37:29 +0300 Subject: Don't run non-test code when defined(testing) --- lib/pure/xmlparser.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure/xmlparser.nim') 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] = @[] -- cgit 1.4.1-2-gfad0