diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-03-20 23:12:24 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-03-20 23:12:24 +0200 |
commit | f49f2f38f01b4ac0ada06bef48bf30bc0c910ce1 (patch) | |
tree | 12c509ae9895ec59cdd4ef7e1ea2eba2127ac4ff | |
parent | b2aa70c6efd650d2187945424353cbd8ec412364 (diff) | |
download | Nim-f49f2f38f01b4ac0ada06bef48bf30bc0c910ce1.tar.gz |
fix the handling of "msg" tests
-rw-r--r-- | tests/testament/specs.nim | 6 | ||||
-rw-r--r-- | tests/testament/tester.nim | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/testament/specs.nim b/tests/testament/specs.nim index f7982127f..65e17a453 100644 --- a/tests/testament/specs.nim +++ b/tests/testament/specs.nim @@ -114,7 +114,11 @@ proc parseSpec*(filename: string): TSpec = result.substr = true of "exitcode": discard parseInt(e.value, result.exitCode) - of "errormsg", "msg": + of "msg": + result.msg = e.value + if result.action != actionRun: + result.action = actionCompile + of "errormsg": result.msg = e.value result.action = actionReject of "disabled": diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim index 923cd7518..6655b1b79 100644 --- a/tests/testament/tester.nim +++ b/tests/testament/tester.nim @@ -110,7 +110,7 @@ proc addResult(r: var TResults, test: TTest, given = given) r.data.addf("$#\t$#\t$#\t$#", name, expected, given, $success) if success notin {reSuccess, reIgnored}: - styledEcho styleBright, fgRed, "^^^ [", $success, "]" + styledEcho styleBright, name, fgRed, " [", $success, "]" styledEcho styleDim, "EXPECTED:" echo expected styledEcho styleDim, "GIVEN:" |