uniq: add test for case-insensitive comparison

This commit is contained in:
Knight 2016-08-13 02:03:42 +08:00
parent 0ea5314ea1
commit f19d361013
2 changed files with 12 additions and 3 deletions

View file

@ -9,8 +9,10 @@ path = "uniq.rs"
[dependencies]
getopts = "*"
libc = "*"
uucore = { path="../uucore" }
[dependencies.uucore]
path="../uucore"
default-features = false
[[bin]]
name = "uniq"

View file

@ -94,9 +94,16 @@ fn test_stdin_repeated_only() {
.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]
fn test_stdin_zero_terminated() {
new_ucmd()
.args(&["-z"]).pipe_in_fixture(SORTED_ZERO_TERMINATED)
.run().stdout_is_fixture("sorted-zero-terminated.expected");
}
}