diff --git a/bin/iutils b/bin/iutils index f0076e8..2000339 100755 --- a/bin/iutils +++ b/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); diff --git a/lib/IUtils/Compiler.rakumod b/lib/IUtils/Compiler.rakumod index d8bfcba..90054c6 100644 --- a/lib/IUtils/Compiler.rakumod +++ b/lib/IUtils/Compiler.rakumod @@ -66,6 +66,7 @@ sub idris-run(*@cmd) is export { return $out; } +# TODO: Special handling for IO Bool to make this eaiser #| Exec the expression with the given name in the given file sub idris-exec($expr, $file) is export { idris-run '--find-ipkg', '--exec', $expr, $file