mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Add a test for tail -c <BYTES>
from stdin
This commit is contained in:
parent
445233389e
commit
9824bc4db3
2 changed files with 10 additions and 0 deletions
3
tests/fixtures/tail/foobar_bytes_stdin.expected
vendored
Normal file
3
tests/fixtures/tail/foobar_bytes_stdin.expected
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
ve
|
||||||
|
diez
|
||||||
|
once
|
|
@ -64,3 +64,10 @@ fn test_bytes_single() {
|
||||||
let result = ucmd.arg("-c").arg("10").arg(INPUT).run();
|
let result = ucmd.arg("-c").arg("10").arg(INPUT).run();
|
||||||
assert_eq!(result.stdout, at.read("foobar_bytes_single.expected"));
|
assert_eq!(result.stdout, at.read("foobar_bytes_single.expected"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_bytes_stdin() {
|
||||||
|
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||||
|
let result = ucmd.arg("-c").arg("13").run_piped_stdin(at.read(INPUT));
|
||||||
|
assert_eq!(result.stdout, at.read("foobar_bytes_stdin.expected"));
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue