Skip to content

Commit

Permalink
test for preserve exit status code
Browse files Browse the repository at this point in the history
the use of the status code was included in a45d2c8, but the test was missed out so rebasing

tested with: cargo test
  • Loading branch information
ahornby committed Jul 22, 2023
1 parent e64422f commit 80955d0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/integration_buck2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ fn test_buck2_specific_version() {
assert!(stdout.starts_with("buck2 "), "found {}", stdout);
assert.success();
}

#[test]
fn test_buck2_fail() {
let mut cmd = Command::cargo_bin("buckle").unwrap();
cmd.arg("--totally-unknown-argument");
let assert = cmd.assert();
let stderr = String::from_utf8(assert.get_output().stderr.to_vec()).unwrap();
assert!(stderr.contains("error: Found argument"), "found {}", stderr);
assert.failure();
}

0 comments on commit 80955d0

Please sign in to comment.