mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
uniq: add test for case-insensitive comparison
This commit is contained in:
parent
0ea5314ea1
commit
f19d361013
2 changed files with 12 additions and 3 deletions
|
@ -9,8 +9,10 @@ path = "uniq.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
getopts = "*"
|
getopts = "*"
|
||||||
libc = "*"
|
|
||||||
uucore = { path="../uucore" }
|
[dependencies.uucore]
|
||||||
|
path="../uucore"
|
||||||
|
default-features = false
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "uniq"
|
name = "uniq"
|
||||||
|
|
|
@ -94,9 +94,16 @@ fn test_stdin_repeated_only() {
|
||||||
.run().stdout_is_fixture("sorted-repeated-only.expected");
|
.run().stdout_is_fixture("sorted-repeated-only.expected");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_stdin_ignore_case() {
|
||||||
|
new_ucmd()
|
||||||
|
.args(&["-i"]).pipe_in_fixture(INPUT)
|
||||||
|
.run().stdout_is_fixture("sorted-ignore-case.expected");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_stdin_zero_terminated() {
|
fn test_stdin_zero_terminated() {
|
||||||
new_ucmd()
|
new_ucmd()
|
||||||
.args(&["-z"]).pipe_in_fixture(SORTED_ZERO_TERMINATED)
|
.args(&["-z"]).pipe_in_fixture(SORTED_ZERO_TERMINATED)
|
||||||
.run().stdout_is_fixture("sorted-zero-terminated.expected");
|
.run().stdout_is_fixture("sorted-zero-terminated.expected");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue