1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-16 03:36:18 +00:00

Merge pull request #3345 from DevSabb/presume-input-pipe

head, tail: include presume-input-pipe parameter
This commit is contained in:
Terts Diepraam 2022-04-01 21:43:47 +02:00 committed by GitHub
commit f00ec12e4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 49 additions and 4 deletions

View file

@ -342,3 +342,21 @@ fn test_head_num_with_undocumented_sign_bytes() {
.succeeds()
.stdout_is("abcde");
}
#[test]
fn test_presume_input_pipe_default() {
new_ucmd!()
.args(&["---presume-input-pipe"])
.pipe_in_fixture(INPUT)
.run()
.stdout_is_fixture("lorem_ipsum_default.expected");
}
#[test]
fn test_presume_input_pipe_5_chars() {
new_ucmd!()
.args(&["-c", "5", "---presume-input-pipe"])
.pipe_in_fixture(INPUT)
.run()
.stdout_is_fixture("lorem_ipsum_5_chars.expected");
}

View file

@ -563,3 +563,12 @@ fn test_lines_zero_terminated() {
.succeeds()
.stdout_only("b\0c\0d\0e\0");
}
#[test]
fn test_presume_input_pipe_default() {
new_ucmd!()
.arg("---presume-input-pipe")
.pipe_in_fixture(FOOBAR_TXT)
.run()
.stdout_is_fixture("foobar_stdin_default.expected");
}