Make json test actually fail when individual test fails

This commit is contained in:
kdeme 2019-10-16 16:42:48 +02:00 committed by zah
parent 88563b8494
commit dc9f7351a1
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,7 @@ proc runTests*(filename: string) =
testStatus "FAILED" testStatus "FAILED"
echo " ACCEPTED MALFORMED BYTES: ", output.str echo " ACCEPTED MALFORMED BYTES: ", output.str
echo " INTERPRETATION:\n", inspectOutput echo " INTERPRETATION:\n", inspectOutput
program_result = 1
continue continue
else: else:
if input.kind == JString and input.str.len != 0 and input.str[0] == '#': if input.kind == JString and input.str.len != 0 and input.str[0] == '#':
@ -68,6 +69,7 @@ proc runTests*(filename: string) =
testStatus "FAILED" testStatus "FAILED"
echo " EXPECTED BYTES: ", expected echo " EXPECTED BYTES: ", expected
echo " ACTUAL BYTES: ", actual echo " ACTUAL BYTES: ", actual
program_result = 1
continue continue
testStatus "OK" testStatus "OK"