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 c754d8e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 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 = "";

let mut failure = false;

Expand All @@ -34,6 +35,12 @@ fn test_global_justfile() {
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;
}

if failure {
panic!("test failed");
}
Expand Down

0 comments on commit c754d8e

Please sign in to comment.