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

tests/tail: Test when -n is larger than the number of lines in the file

This commit is contained in:
Nick Fitzgerald 2016-03-27 14:42:45 -07:00
parent 9a5209a7a4
commit 0d281cf886

View file

@ -23,6 +23,13 @@ fn test_single_default() {
assert_eq!(result.stdout, at.read("foobar_single_default.expected")); assert_eq!(result.stdout, at.read("foobar_single_default.expected"));
} }
#[test]
fn test_n_greater_than_number_of_lines() {
let (at, mut ucmd) = testing(UTIL_NAME);
let result = ucmd.arg("-n").arg("99999999").arg(FOOBAR_TXT).run();
assert_eq!(result.stdout, at.read(FOOBAR_TXT));
}
#[test] #[test]
fn test_single_big_args() { fn test_single_big_args() {
const FILE: &'static str = "single_big_args.txt"; const FILE: &'static str = "single_big_args.txt";