Implement support for IO Bool tests
This commit is contained in:
parent
c089685a2a
commit
09ac7506ee
4 changed files with 49 additions and 11 deletions
|
@ -43,10 +43,10 @@ multi MAIN(
|
|||
for $module.tests -> $test {
|
||||
try {
|
||||
# FIXME this doesn't actually capture the exit code
|
||||
idris-exec $test.expr, $module.source.relative;
|
||||
idris-exec $test.expr, $module.source.relative, $test.output-type;
|
||||
}
|
||||
my $testf = colored $test.name, 'underline';
|
||||
if $! {
|
||||
if $! ~~ ExpressionError {
|
||||
# TODO: Don't show stdout if its empty
|
||||
$module-failures += 1;
|
||||
say "{colored '+', 'red'} $testf: {colored 'FAIL', 'red bold'}"
|
||||
|
@ -55,6 +55,8 @@ multi MAIN(
|
|||
say $!.err.lines.map(*.indent(8)).join("\n");
|
||||
say (colored 'exit code', 'red').indent(6),
|
||||
": {$!.exit-code}";
|
||||
} elsif $! {
|
||||
die $!;
|
||||
} else {
|
||||
say "{colored '+', 'green'} $testf: {colored 'pass', 'green'}"
|
||||
.indent(4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue