updated the tester

This commit is contained in:
Araq
2014-08-29 00:57:21 +02:00
parent 051b9ca0ce
commit 16b15f360a

View File

@@ -59,7 +59,7 @@ when not declared(parseCfgBool):
case normalize(s)
of "y", "yes", "true", "1", "on": result = true
of "n", "no", "false", "0", "off": result = false
else: raise newException(EInvalidValue, "cannot interpret as a bool: " & s)
else: raise newException(ValueError, "cannot interpret as a bool: " & s)
proc extractSpec(filename: string): string =
const tripleQuote = "\"\"\""
@@ -78,7 +78,7 @@ when not defined(nimhygiene):
template parseSpecAux(fillResult: stmt) {.immediate.} =
var ss = newStringStream(extractSpec(filename))
var p {.inject.}: TCfgParser
var p {.inject.}: CfgParser
open(p, ss, filename, 1)
while true:
var e {.inject.} = next(p)