mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
uniq: add test for zero terminated input and output
This commit is contained in:
parent
7ff57d6b66
commit
c0b2da7c01
3 changed files with 8 additions and 0 deletions
BIN
tests/fixtures/uniq/sorted-zero-terminated.expected
vendored
Normal file
BIN
tests/fixtures/uniq/sorted-zero-terminated.expected
vendored
Normal file
Binary file not shown.
BIN
tests/fixtures/uniq/sorted-zero-terminated.txt
vendored
Normal file
BIN
tests/fixtures/uniq/sorted-zero-terminated.txt
vendored
Normal file
Binary file not shown.
|
@ -8,6 +8,7 @@ fn new_ucmd() -> UCommand {
|
||||||
static INPUT: &'static str = "sorted.txt";
|
static INPUT: &'static str = "sorted.txt";
|
||||||
static SKIP_CHARS: &'static str = "skip-chars.txt";
|
static SKIP_CHARS: &'static str = "skip-chars.txt";
|
||||||
static SKIP_FIELDS: &'static str = "skip-fields.txt";
|
static SKIP_FIELDS: &'static str = "skip-fields.txt";
|
||||||
|
static SORTED_ZERO_TERMINATED: &'static str = "sorted-zero-terminated.txt";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_stdin_default() {
|
fn test_stdin_default() {
|
||||||
|
@ -92,3 +93,10 @@ fn test_stdin_repeated_only() {
|
||||||
.args(&["-d"]).pipe_in_fixture(INPUT)
|
.args(&["-d"]).pipe_in_fixture(INPUT)
|
||||||
.run().stdout_is_fixture("sorted-repeated-only.expected");
|
.run().stdout_is_fixture("sorted-repeated-only.expected");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_stdin_zero_terminated() {
|
||||||
|
new_ucmd()
|
||||||
|
.args(&["-z"]).pipe_in_fixture(SORTED_ZERO_TERMINATED)
|
||||||
|
.run().stdout_is_fixture("sorted-zero-terminated.expected");
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue