1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

tests/pathchk: check error message

This commit is contained in:
Zhuoxun Yang 2023-10-19 01:29:53 +08:00
parent f63f9a06f6
commit 4424091592

View file

@ -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!()