mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
uniq: accept shortcuts for stringly-enum arguments
This commit is contained in:
parent
3285f95eb3
commit
a699bfd1fb
2 changed files with 65 additions and 4 deletions
|
@ -145,6 +145,21 @@ fn test_stdin_all_repeated() {
|
|||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--all-repeated=none"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--all-repeated=non"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--all-repeated=n"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -167,6 +182,16 @@ fn test_stdin_all_repeated_separate() {
|
|||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated-separate.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--all-repeated=separat"]) // spell-checker:disable-line
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated-separate.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--all-repeated=s"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated-separate.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -176,6 +201,16 @@ fn test_stdin_all_repeated_prepend() {
|
|||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated-prepend.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--all-repeated=prepen"]) // spell-checker:disable-line
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated-prepend.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--all-repeated=p"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("sorted-all-repeated-prepend.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -253,6 +288,11 @@ fn test_group_prepend() {
|
|||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-prepend.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--group=p"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-prepend.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -262,6 +302,11 @@ fn test_group_append() {
|
|||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-append.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--group=a"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-append.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -271,6 +316,16 @@ fn test_group_both() {
|
|||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-both.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--group=bot"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-both.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--group=b"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group-both.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -280,6 +335,11 @@ fn test_group_separate() {
|
|||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group.expected");
|
||||
new_ucmd!()
|
||||
.args(&["--group=s"])
|
||||
.pipe_in_fixture(INPUT)
|
||||
.run()
|
||||
.stdout_is_fixture("group.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue