1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

kill: add tests to check multiple output

This commit is contained in:
Haisham 2024-04-11 08:45:53 +05:00 committed by Ben Wiederhake
parent 693149d683
commit c4c81291b7

View file

@ -92,6 +92,28 @@ fn test_kill_list_one_signal_from_name() {
.stdout_matches(&Regex::new("\\b9\\b").unwrap());
}
#[test]
fn test_kill_list_two_signal_from_name() {
new_ucmd!()
.arg("-l")
.arg("INT")
.arg("KILL")
.succeeds()
.stdout_matches(&Regex::new("\\d\n\\d").unwrap());
}
#[test]
fn test_kill_list_three_signal_first_unknown() {
new_ucmd!()
.arg("-l")
.arg("IAMNOTASIGNAL") // spell-checker:disable-line
.arg("INT")
.arg("KILL")
.fails()
.stderr_contains("unknown signal")
.stdout_matches(&Regex::new("\\d\n\\d").unwrap());
}
#[test]
fn test_kill_set_bad_signal_name() {
// spell-checker:disable-line