mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
uniq: implement group option
This commit is contained in:
parent
20d071a482
commit
19c6a42de5
8 changed files with 249 additions and 20 deletions
|
@ -147,3 +147,48 @@ fn test_invalid_utf8() {
|
|||
.failure()
|
||||
.stderr_only("uniq: error: invalid utf-8 sequence of 1 bytes from index 0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_group() {
|
||||
new_ucmd!()
|
||||
.args(&["--group"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_group_prepend() {
|
||||
new_ucmd!()
|
||||
.args(&["--group=prepend"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-prepend.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_group_append() {
|
||||
new_ucmd!()
|
||||
.args(&["--group=append"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-append.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_group_both() {
|
||||
new_ucmd!()
|
||||
.args(&["--group=both"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-both.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_group_separate() {
|
||||
new_ucmd!()
|
||||
.args(&["--group=separate"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group.expected");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue