Skip to content

Commit

Permalink
tests/pathchk: check error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Luv-Ray committed Oct 18, 2023
1 parent f63f9a0 commit 4424091
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/by-util/test_pathchk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!()
Expand Down

0 comments on commit 4424091

Please sign in to comment.