diff options
author | Oscar Campbell <oscar@campbell.nu> | 2015-06-10 19:52:26 +0200 |
---|---|---|
committer | Oscar Campbell <oscar@campbell.nu> | 2015-06-10 19:52:26 +0200 |
commit | ee3d390b3ffc394fca27fef42e7e36277df22dad (patch) | |
tree | 169b6afcd89830d86c648904b736eee6cd8eba04 | |
parent | b3eb8ab81c325d21dd234e945224b0e14a1b88f4 (diff) | |
download | Nim-ee3d390b3ffc394fca27fef42e7e36277df22dad.tar.gz |
Revert from columnar layout. Remove temp-fix for 2857.
-rw-r--r-- | tests/testament/tester.nim | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/testament/tester.nim b/tests/testament/tester.nim index 2c4460395..704d7e76e 100644 --- a/tests/testament/tester.nim +++ b/tests/testament/tester.nim @@ -126,9 +126,6 @@ proc `$`(x: TResults): string = "Tests skipped: $2 / $3 <br />\n") % [$x.passed, $x.skipped, $x.total] -proc leftAlign(s: string, count: Natural, padding = ' '): string = - s & repeat(padding, max(0, count - s.len)) - proc addResult(r: var TResults, test: TTest, expected, given: string, success: TResultEnum) = let name = test.name.extractFilename & test.options @@ -140,13 +137,12 @@ proc addResult(r: var TResults, test: TTest, expected = expected, given = given) r.data.addf("$#\t$#\t$#\t$#", name, expected, given, $success) - let alignedName = leftAlign(name, 72) # Make the total line length 78 chars if success == reSuccess: - styledEcho fgCyan, alignedName, fgGreen, " [PASS]" + styledEcho fgGreen, "PASS: ", fgCyan, name elif success == reIgnored: - styledEcho styleBright, fgCyan, alignedName, styleDim, fgYellow, " [SKIP]" + styledEcho styleDim, fgYellow, "SKIP: ", styleBright, fgCyan, name else: - styledEcho styleBright, fgCyan, alignedName, fgRed, " [FAIL]" + styledEcho styleBright, fgRed, "FAIL: ", fgCyan, name styledEcho styleBright, fgCyan, "Test \"", test.name, "\"", " in category \"", test.cat.string, "\"" styledEcho styleBright, fgRed, "Failure: ", $success styledEcho fgYellow, "Expected:" @@ -295,13 +291,11 @@ proc testSpec(r: var TResults, test: TTest) = reExitCodesDiffer) return - # This is a bit ugly atm. if bufB != expectedOut: if not (expected.substr and expectedOut in bufB): - if not (expectedOut == "" and bufB == "\27[0m"): - given.err = reOutputsDiffer - r.addResult(test, expected.outp, bufB, reOutputsDiffer) - return + given.err = reOutputsDiffer + r.addResult(test, expected.outp, bufB, reOutputsDiffer) + return compilerOutputTests(test, given, expected, r) return |