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

tail: handle file NotFound error correctly

This commit is contained in:
Jan Scheer 2021-09-16 21:40:15 +02:00
parent 1f24b1f59c
commit a727b2e666
No known key found for this signature in database
GPG key ID: C62AD4C29E2B9828
2 changed files with 35 additions and 14 deletions

View file

@ -288,6 +288,22 @@ fn test_multiple_input_files() {
.stdout_is_fixture("foobar_follow_multiple.expected");
}
#[test]
fn test_multiple_input_files_missing() {
new_ucmd!()
.arg(FOOBAR_TXT)
.arg("missing1")
.arg(FOOBAR_2_TXT)
.arg("missing2")
.run()
.stdout_is_fixture("foobar_follow_multiple.expected")
.stderr_is(
"tail: cannot open 'missing1': No such file or directory\n\
tail: cannot open 'missing2': No such file or directory",
)
.code_is(1);
}
#[test]
fn test_multiple_input_files_with_suppressed_headers() {
new_ucmd!()