clean up error display
This commit is contained in:
parent
c5ff918640
commit
cab0cb5ce1
2 changed files with 6 additions and 5 deletions
10
bin/iutils
10
bin/iutils
|
@ -8,6 +8,7 @@ use IUtils::Regexes;
|
|||
use IUtils::Compiler;
|
||||
|
||||
# TODO: Add filtering for tests based on module/name
|
||||
# TODO: Move some of this functionality into methods for the relevant structs
|
||||
#| Execute the tests in an idris project
|
||||
multi MAIN(
|
||||
"test",
|
||||
|
@ -46,15 +47,14 @@ multi MAIN(
|
|||
}
|
||||
my $testf = colored $test, 'underline';
|
||||
if $! {
|
||||
# TODO: Don't show stdout if its empty
|
||||
$module-failures += 1;
|
||||
my $stdout = $1.err.lines.map(*.indent(8)).join("\n");
|
||||
say "{colored '+', 'red'} $testf: {colored 'FAIL', 'red bold'}"
|
||||
.indent(4);
|
||||
say "stdout:".indent(6);
|
||||
$!.err.lines.map(*.indent(8)).join("\n");
|
||||
say "stderr:".indent(6);
|
||||
$!.err.lines.map(*.indent(8)).join("\n");
|
||||
say "exit code: {$!.exit-code}"
|
||||
say $!.err.lines.map(*.indent(8)).join("\n");
|
||||
say (colored 'exit code', 'red').indent(6),
|
||||
": {$!.exit-code}";
|
||||
} else {
|
||||
say "{colored '+', 'green'} $testf: {colored 'pass', 'green'}"
|
||||
.indent(4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue