Revert from columnar layout. Remove temp-fix for 2857.
This commit is contained in:
parent
b3eb8ab81c
commit
ee3d390b3f
1 changed files with 6 additions and 12 deletions
|
|
@ -126,9 +126,6 @@ proc `$`(x: TResults): string =
|
||||||
"Tests skipped: $2 / $3 <br />\n") %
|
"Tests skipped: $2 / $3 <br />\n") %
|
||||||
[$x.passed, $x.skipped, $x.total]
|
[$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,
|
proc addResult(r: var TResults, test: TTest,
|
||||||
expected, given: string, success: TResultEnum) =
|
expected, given: string, success: TResultEnum) =
|
||||||
let name = test.name.extractFilename & test.options
|
let name = test.name.extractFilename & test.options
|
||||||
|
|
@ -140,13 +137,12 @@ proc addResult(r: var TResults, test: TTest,
|
||||||
expected = expected,
|
expected = expected,
|
||||||
given = given)
|
given = given)
|
||||||
r.data.addf("$#\t$#\t$#\t$#", name, expected, given, $success)
|
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:
|
if success == reSuccess:
|
||||||
styledEcho fgCyan, alignedName, fgGreen, " [PASS]"
|
styledEcho fgGreen, "PASS: ", fgCyan, name
|
||||||
elif success == reIgnored:
|
elif success == reIgnored:
|
||||||
styledEcho styleBright, fgCyan, alignedName, styleDim, fgYellow, " [SKIP]"
|
styledEcho styleDim, fgYellow, "SKIP: ", styleBright, fgCyan, name
|
||||||
else:
|
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, fgCyan, "Test \"", test.name, "\"", " in category \"", test.cat.string, "\""
|
||||||
styledEcho styleBright, fgRed, "Failure: ", $success
|
styledEcho styleBright, fgRed, "Failure: ", $success
|
||||||
styledEcho fgYellow, "Expected:"
|
styledEcho fgYellow, "Expected:"
|
||||||
|
|
@ -295,13 +291,11 @@ proc testSpec(r: var TResults, test: TTest) =
|
||||||
reExitCodesDiffer)
|
reExitCodesDiffer)
|
||||||
return
|
return
|
||||||
|
|
||||||
# This is a bit ugly atm.
|
|
||||||
if bufB != expectedOut:
|
if bufB != expectedOut:
|
||||||
if not (expected.substr and expectedOut in bufB):
|
if not (expected.substr and expectedOut in bufB):
|
||||||
if not (expectedOut == "" and bufB == "\27[0m"):
|
given.err = reOutputsDiffer
|
||||||
given.err = reOutputsDiffer
|
r.addResult(test, expected.outp, bufB, reOutputsDiffer)
|
||||||
r.addResult(test, expected.outp, bufB, reOutputsDiffer)
|
return
|
||||||
return
|
|
||||||
|
|
||||||
compilerOutputTests(test, given, expected, r)
|
compilerOutputTests(test, given, expected, r)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue