diff --git a/README.md b/README.md index 99db360b9..5c5d42d29 100644 --- a/README.md +++ b/README.md @@ -147,29 +147,106 @@ To contribute to coreutils, please see [CONTRIBUTING](CONTRIBUTING.md). To do ----- -- chcon -- runcon -- ~~md5sum~~, ~~sha1sum~~, ~~sha224sum~~, ~~sha256sum~~, ~~sha384sum~~, ~~sha512sum~~ (replaced by [hashsum](https://github.com/uutils/coreutils/blob/master/src/hashsum/hashsum.rs)) -- chgrp -- cp (not much done) -- csplit -- date -- dd -- df -- expr (almost done, no regular expressions) -- join -- ls -- mv (almost done, one more option) -- numfmt -- od (in progress, needs lots of work) -- pr -- printf -- sort (a couple of options implemented) -- split (a couple of missing options) -- stty -- tail (not all features implemented) -- test (not all features implemented) -- uniq (a couple of missing options) +* [x] arch +* [x] base32 +* [x] base64 +* [x] basename +* [x] cat +* [ ] chcon +* [ ] chgrp +* [x] chmod +* [x] chown +* [x] chroot +* [x] cksum +* [x] comm +* [ ] cp (not much done) +* [ ] csplit +* [x] cut +* [ ] date +* [ ] dd +* [ ] df +* [x] dircolors +* [x] dirname +* [x] du +* [x] echo +* [x] env +* [x] expand +* [ ] expr (almost done, no regular expressions) +* [x] factor +* [x] false +* [x] fmt +* [x] fold +* [x] groups +* [x] hashsum +* [x] head +* [x] hostid +* [x] hostname +* [x] id +* [ ] install (a couple of missing options) +* [ ] join +* [x] kill +* [x] link +* [x] ln +* [x] logname +* [ ] ls +* [x] ~~md5sum~~, ~~sha1sum~~, ~~sha224sum~~, ~~sha256sum~~, ~~sha384sum~~, ~~sha512sum~~ (replaced by [hashsum](https://github.com/uutils/coreutils/blob/master/src/hashsum/hashsum.rs)) +* [x] mkdir +* [x] mkfifo +* [x] mknod +* [x] mktemp +* [ ] mv (almost done, one more option) +* [x] nice +* [x] nl +* [x] nohup +* [x] nproc +* [ ] numfmt +* [ ] od (in progress, needs lots of work) +* [x] paste +* [x] pathchk +* [x] pinky +* [ ] pr +* [x] printenv +* [ ] printf +* [x] ptx +* [x] pwd +* [x] readlink +* [x] realpath +* [x] relpath +* [x] rm +* [x] rmdir +* [ ] runcon +* [x] seq +* [x] shred +* [x] shuf +* [x] sleep +* [ ] sort (a couple of options implemented) +* [ ] split (a couple of missing options) +* [x] stat +* [x] stdbuf +* [ ] stty +* [x] sum +* [x] sync +* [x] tac +* [ ] tail (not all features implemented) +* [x] tee +* [ ] test (not all features implemented) +* [x] timeout +* [x] touch +* [x] tr +* [x] true +* [x] truncate +* [x] tsort +* [x] tty +* [x] uname +* [x] unexpand +* [x] uniq +* [x] unlink +* [x] uptime +* [x] users +* [x] wc +* [x] who +* [x] whoami +* [x] yes License ------- 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/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index a62afa620..7a53082a7 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -4,22 +4,25 @@ version = "0.0.1" authors = [] [dependencies] -libc = { git = "https://github.com/rust-lang/libc.git" } getopts = "*" time = { version = "*", optional = true } data-encoding = { version = "^1.1", optional = true } +[dependencies.libc] +git = "https://github.com/rust-lang/libc.git" +optional = true + [features] -fs = [] +fs = ["libc"] utf8 = [] encoding = ["data-encoding"] parse_time = [] -utmpx = ["time"] -c_types = [] -process = [] +utmpx = ["time", "libc"] +c_types = ["libc"] +process = ["libc"] signals = [] wide = [] -default = ["fs", "utf8", "encoding", "parse_time", "utmpx", "c_types", "process", "signals", "wide"] +default = ["fs", "libc", "utf8", "encoding", "parse_time", "utmpx", "c_types", "process", "signals", "wide"] [lib] path = "lib.rs" diff --git a/src/uucore/lib.rs b/src/uucore/lib.rs index 994112b74..86e24a07a 100644 --- a/src/uucore/lib.rs +++ b/src/uucore/lib.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "libc")] pub extern crate libc; #[macro_use] 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 +}