Compare commits

..

No commits in common. "dd1579607a83b4d960324e2ad8078831128f4b9f" and "775652c6cf46f5399ecbdea51c14a4f328ab97b2" have entirely different histories.

3 changed files with 13 additions and 22 deletions

View file

@ -45,7 +45,7 @@ multi MAIN(
say "{colored '*', 'yellow bold'} Testing $test-module-name"; say "{colored '*', 'yellow bold'} Testing $test-module-name";
for $runable.tests.keys -> $module-name { for $runable.tests.keys -> $module-name {
# Skip this module if it's not the one we are looking for # Skip this module if it's not the one we are looking for
if $module-filter { if $module-name {
next unless $module-name eq $module-filter; next unless $module-name eq $module-filter;
} }
my $module-failures = 0; my $module-failures = 0;

View file

@ -33,14 +33,12 @@ class Test {
say $_.out.trim.lines.map(*.indent($indent-level + 2)) say $_.out.trim.lines.map(*.indent($indent-level + 2))
.join("\n"); .join("\n");
} }
# say $_.err.elems; if $_.err.trim {
# if $_.err.trim { say colored('stderr:', 'underline')
# say $_.err.trim.lines.elems; .indent($indent-level + 2);
# say colored('stderr:', 'underline') say $_.err.trim.lines.map(*.indent($indent-level + 2))
# .indent($indent-level + 2); .join("\n");
# say $_.err.trim.lines.map(*.indent($indent-level + 2)) }
# .join("\n");
# }
return True; return True;
} }
} }
@ -145,10 +143,5 @@ sub scan-ipkg(IO::Path:D $ipkg --> PackageInfo:D) {
sub scan-packages(--> Array[PackageInfo:D]) is export { sub scan-packages(--> Array[PackageInfo:D]) is export {
my PackageInfo:D @ipkgs = my PackageInfo:D @ipkgs =
paths(:file(*.ends-with(".ipkg"))).map(*.IO.&scan-ipkg); paths(:file(*.ends-with(".ipkg"))).map(*.IO.&scan-ipkg);
# Check out the parents if we didn't find an ipkg
if @ipkgs {
return @ipkgs; return @ipkgs;
} else {
indir $*CWD.parent, {scan-packages};
}
} }

View file

@ -79,8 +79,7 @@ sub idris-run(*@cmd) is export {
my $err = $proc.err.slurp(:close); my $err = $proc.err.slurp(:close);
if !$proc || $out.contains("Error:") { if !$proc || $out.contains("Error:") {
IdrisError.new( IdrisError.new(
out => $out, out => $out, err => $err,
err => $err,
exit-code => $proc.exitcode, command => @cmd.Str) exit-code => $proc.exitcode, command => @cmd.Str)
.throw; .throw;
} }
@ -111,13 +110,12 @@ sub idris-exec($expr, $file, $output-type? = Unit) is export {
} }
} }
# Run the expression # Run the expression
my $proc = run 'build/exec/iutils_out', :out, :!err; my $proc = run 'build/exec/iutils_out', :out, :err;
my $out = $proc.out.slurp(); my $out = $proc.out.slurp(:close);
# my $err = $proc.err.slurp(); my $err = $proc.err.slurp(:close);
unless $proc { unless $proc {
ExpressionError.new( ExpressionError.new(
out => $out, out => $out, err => $err,
# err => $err,
exit-code => $proc.exitcode, expr => $expr exit-code => $proc.exitcode, expr => $expr
).throw; ).throw;
} }