1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 03:26:18 +00:00

hostid: return correct exit code on error

This commit is contained in:
Ben Wiederhake 2024-03-31 21:08:01 +02:00
parent 333e4d9fe9
commit f5f8cf08e0
2 changed files with 10 additions and 1 deletions

View file

@ -10,3 +10,12 @@ fn test_normal() {
let re = Regex::new(r"^[0-9a-f]{8}").unwrap();
new_ucmd!().succeeds().stdout_matches(&re);
}
#[test]
fn test_invalid_flag() {
new_ucmd!()
.arg("--invalid-argument")
.fails()
.no_stdout()
.code_is(1);
}