Allow simpler json files to be processed, add dir sep for echo

This commit is contained in:
coffeepots 2018-10-10 17:26:32 +01:00
parent 2ee9861a9e
commit 7c778867a2
1 changed files with 3 additions and 2 deletions

View File

@ -105,7 +105,8 @@ proc lacksHomesteadPostStates*(filename: string): bool =
fixture = child
break
return fixture.has_key("transaction") and not fixture["post"].has_key("Homestead")
return fixture.kind == JObject and fixture.has_key("transaction") and
(fixture.has_key("post") and not fixture["post"].has_key("Homestead"))
macro jsonTest*(s: static[string], handler: untyped): untyped =
let
@ -129,7 +130,7 @@ macro jsonTest*(s: static[string], handler: untyped): untyped =
for child in filenames:
let (filename, folder, name) = child
test filename:
echo folder, name
echo folder / name
status[folder][name] = Status.FAIL
try:
`handler`(parseJSON(readFile(filename)), `testStatusIMPL`)