diff --git a/tests/by-util/test_pathchk.rs b/tests/by-util/test_pathchk.rs index e1f4bc539b7..d66ecb9efb4 100644 --- a/tests/by-util/test_pathchk.rs +++ b/tests/by-util/test_pathchk.rs @@ -20,9 +20,15 @@ fn test_default_mode() { new_ucmd!().args(&["dir#/$file"]).succeeds().no_stdout(); // fail on empty path - new_ucmd!().args(&[""]).fails().no_stdout(); + new_ucmd!() + .args(&[""]) + .fails() + .stderr_only("pathchk: '': No such file or directory\n"); - new_ucmd!().args(&["", ""]).fails().no_stdout(); + new_ucmd!().args(&["", ""]).fails().stderr_only( + "pathchk: '': No such file or directory\n\ + pathchk: '': No such file or directory\n", + ); // fail on long path new_ucmd!()