1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

uniq: add test for zero terminated input and output

This commit is contained in:
Chris Nikkel 2016-08-06 18:25:11 -07:00
parent 7ff57d6b66
commit c0b2da7c01
3 changed files with 8 additions and 0 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");
}