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

tail: improve error handling when file not found

This commit is contained in:
Jeffrey Finkelstein 2022-01-17 10:18:04 -05:00
parent ec386fa460
commit e575007629
2 changed files with 13 additions and 3 deletions

View file

@ -3,7 +3,7 @@
// * For the full copyright and license information, please view the LICENSE
// * file that was distributed with this source code.
// spell-checker:ignore (ToDO) abcdefghijklmnopqrstuvwxyz efghijklmnopqrstuvwxyz vwxyz emptyfile
// spell-checker:ignore (ToDO) abcdefghijklmnopqrstuvwxyz efghijklmnopqrstuvwxyz vwxyz emptyfile bogusfile
extern crate tail;
@ -475,3 +475,12 @@ fn test_tail_bytes_for_funny_files() {
.code_is(exp_result.code());
}
}
#[test]
fn test_no_such_file() {
new_ucmd!()
.arg("bogusfile")
.fails()
.no_stdout()
.stderr_contains("cannot open 'bogusfile' for reading: No such file or directory");
}