diff --git a/tests/by-util/test_cat.rs b/tests/by-util/test_cat.rs index 560709f29..ab8e71899 100644 --- a/tests/by-util/test_cat.rs +++ b/tests/by-util/test_cat.rs @@ -175,6 +175,7 @@ fn test_piped_to_dev_full() { s.ucmd() .set_stdout(dev_full) .pipe_in_fixture("alpha.txt") + .ignore_stdin_write_error() .fails() .stderr_contains("No space left on device"); } @@ -224,6 +225,7 @@ fn test_three_directories_and_file_and_stdin() { "test_directory3", ]) .pipe_in("stdout bytes") + .ignore_stdin_write_error() .fails() .stderr_is_fixture("three_directories_and_file_and_stdin.stderr.expected") .stdout_is( diff --git a/tests/by-util/test_numfmt.rs b/tests/by-util/test_numfmt.rs index 2c2e95d0b..bb80502d5 100644 --- a/tests/by-util/test_numfmt.rs +++ b/tests/by-util/test_numfmt.rs @@ -666,7 +666,12 @@ fn test_invalid_stdin_number_returns_status_2() { #[test] fn test_invalid_stdin_number_in_middle_of_input() { - new_ucmd!().pipe_in("100\nhello\n200").fails().code_is(2); + new_ucmd!() + .pipe_in("100\nhello\n200") + .ignore_stdin_write_error() + .fails() + .stdout_is("100\n") + .code_is(2); } #[test] diff --git a/tests/by-util/test_sort.rs b/tests/by-util/test_sort.rs index 97c72c7b1..8c2241e51 100644 --- a/tests/by-util/test_sort.rs +++ b/tests/by-util/test_sort.rs @@ -813,8 +813,6 @@ fn test_check_silent() { #[test] fn test_check_unique() { - // Due to a clap bug the combination "-cu" does not work. "-c -u" works. - // See https://github.com/clap-rs/clap/issues/2624 new_ucmd!() .args(&["-c", "-u"]) .pipe_in("A\nA\n") @@ -823,6 +821,16 @@ fn test_check_unique() { .stderr_only("sort: -:2: disorder: A\n"); } +#[test] +fn test_check_unique_combined() { + new_ucmd!() + .args(&["-cu"]) + .pipe_in("A\nA\n") + .fails() + .code_is(1) + .stderr_only("sort: -:2: disorder: A\n"); +} + #[test] fn test_dictionary_and_nonprinting_conflicts() { let conflicting_args = ["n", "h", "g", "M"]; diff --git a/tests/by-util/test_split.rs b/tests/by-util/test_split.rs index acb8ab561..4e98a046a 100644 --- a/tests/by-util/test_split.rs +++ b/tests/by-util/test_split.rs @@ -1068,6 +1068,7 @@ fn test_split_number_oversized_stdin() { new_ucmd!() .args(&["--number=3", "---io-blksize=600"]) .pipe_in_fixture("sixhundredfiftyonebytes.txt") + .ignore_stdin_write_error() .fails() .stderr_only("split: -: cannot determine input size\n"); } diff --git a/tests/by-util/test_tee.rs b/tests/by-util/test_tee.rs index 34076bbf9..c18668278 100644 --- a/tests/by-util/test_tee.rs +++ b/tests/by-util/test_tee.rs @@ -77,7 +77,7 @@ fn test_tee_no_more_writeable_1() { // equals to 'tee /dev/full out2