Skip to content

Commit

Permalink
Expected stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
neunenak committed May 16, 2024
1 parent 72163c3 commit 4d914ab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ fn test_global_justfile() {

let expected_status = 0;
let expected_stdout = "foo\n";
let expected_stderr = "echo 'foo'\n";

let mut failure = false;

Expand All @@ -30,7 +31,13 @@ fn test_global_justfile() {

let stdout = str::from_utf8(&output.stdout).unwrap();
if stdout != expected_stdout {
println!("bad stdout:\ngot:\n{stdout:?}\n\nexpected:\n{expected_stdout:?}");
println!("Bad stdout:\ngot:\n{stdout:?}\n\nexpected:\n{expected_stdout:?}");
failure = true;
}

let stderr = str::from_utf8(&output.stderr).unwrap();
if stderr != expected_stderr {
println!("Bad stderr:\ngot:\n{stderr:?}\n\nexpected:\n{expected_stderr:?}");
failure = true;
}

Expand Down

0 comments on commit 4d914ab

Please sign in to comment.