diff --git a/tests/by-util/test_numfmt.rs b/tests/by-util/test_numfmt.rs index 788ead0c0f0..12854a77d81 100644 --- a/tests/by-util/test_numfmt.rs +++ b/tests/by-util/test_numfmt.rs @@ -184,7 +184,7 @@ fn test_unit_size_hyphen_leading_as_separate_arg() { for opt in ["--from-unit", "--to-unit"] { new_ucmd!() .args(&[opt, "-1"]) - .pipe_in("5\n") + .pipe_in("") .fails() .stderr_contains("invalid unit size: '-1'"); } @@ -196,7 +196,7 @@ fn test_unit_hyphen_leading_as_separate_arg() { for opt in ["--from", "--to"] { new_ucmd!() .args(&[opt, "-x"]) - .pipe_in("5\n") + .pipe_in("") .fails() .stderr_contains("invalid argument '-x' for '--"); } diff --git a/tests/by-util/test_sort.rs b/tests/by-util/test_sort.rs index 67934256ec3..e3282ac6f8d 100644 --- a/tests/by-util/test_sort.rs +++ b/tests/by-util/test_sort.rs @@ -1894,7 +1894,7 @@ fn test_separator_attached_equals_double() { // `-t==` selects the two-character separator `==`, which GNU rejects. new_ucmd!() .args(&["-t==", "-k", "2"]) - .pipe_in("a=b=c\n") + .pipe_in("") .fails() .stderr_contains("separator must be exactly one character long: '=='"); } @@ -1904,7 +1904,7 @@ fn test_separator_attached_equals_multi_char() { // `-t=a` selects the two-character separator `=a`, which GNU rejects. new_ucmd!() .args(&["-t=a", "-k", "2"]) - .pipe_in("a=b=c\n") + .pipe_in("") .fails() .stderr_contains("separator must be exactly one character long: '=a'"); }