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

Merge pull request #946 from ChrisNikkel/feature/zero_terminated

uniq: add -z option to allow for zero terminated input and output
This commit is contained in:
Nathan Ross 2016-08-06 22:49:10 -04:00 committed by GitHub
commit 1880c46acd
4 changed files with 26 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View file

@ -8,6 +8,7 @@ fn new_ucmd() -> UCommand {
static INPUT: &'static str = "sorted.txt";
static SKIP_CHARS: &'static str = "skip-chars.txt";
static SKIP_FIELDS: &'static str = "skip-fields.txt";
static SORTED_ZERO_TERMINATED: &'static str = "sorted-zero-terminated.txt";
#[test]
fn test_stdin_default() {
@ -92,3 +93,10 @@ fn test_stdin_repeated_only() {
.args(&["-d"]).pipe_in_fixture(INPUT)
.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");
}