mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 15:59:20 +03:00
Print out stderr if CLI test fails
This commit is contained in:
parent
bad993a957
commit
1a5ef05585
@ -233,7 +233,13 @@ mod cli_run {
|
||||
);
|
||||
}
|
||||
|
||||
assert!(out.status.success());
|
||||
if !out.status.success() {
|
||||
// We don't need stdout, Cargo prints it for us.
|
||||
panic!(
|
||||
"Example program exited with status {:?}\nstderr was:\n{:#?}",
|
||||
out.status, out.stderr
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ int main() {
|
||||
}
|
||||
|
||||
// Write to stdout
|
||||
if (write(1, str_bytes, str_len) >= 0) {
|
||||
if (write(STDOUT_FILENO, str_bytes, str_len) >= 0) {
|
||||
// Writing succeeded!
|
||||
return 0;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user