From f19d361013c7e96b3a2a6b20bb2e7922cbee0d92 Mon Sep 17 00:00:00 2001 From: Knight Date: Sat, 13 Aug 2016 02:03:42 +0800 Subject: [PATCH] uniq: add test for case-insensitive comparison --- src/uniq/Cargo.toml | 6 ++++-- tests/test_uniq.rs | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/uniq/Cargo.toml b/src/uniq/Cargo.toml index bbab749c8..b3c415e54 100644 --- a/src/uniq/Cargo.toml +++ b/src/uniq/Cargo.toml @@ -9,8 +9,10 @@ path = "uniq.rs" [dependencies] getopts = "*" -libc = "*" -uucore = { path="../uucore" } + +[dependencies.uucore] +path="../uucore" +default-features = false [[bin]] name = "uniq" diff --git a/tests/test_uniq.rs b/tests/test_uniq.rs index f7cf42d45..481404b24 100644 --- a/tests/test_uniq.rs +++ b/tests/test_uniq.rs @@ -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"); -} \ No newline at end of file +}