1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

sort: add skipped test for combined flags

Now that clap#2624 has been resolved, we can and should test both variants.
This commit is contained in:
Ben Wiederhake 2024-02-23 05:19:02 +01:00
parent 868600cac9
commit 9fa808fb5e

View file

@ -813,8 +813,6 @@ fn test_check_silent() {
#[test]
fn test_check_unique() {
// Due to a clap bug the combination "-cu" does not work. "-c -u" works.
// See https://github.com/clap-rs/clap/issues/2624
new_ucmd!()
.args(&["-c", "-u"])
.pipe_in("A\nA\n")
@ -823,6 +821,16 @@ fn test_check_unique() {
.stderr_only("sort: -:2: disorder: A\n");
}
#[test]
fn test_check_unique_combined() {
new_ucmd!()
.args(&["-cu"])
.pipe_in("A\nA\n")
.fails()
.code_is(1)
.stderr_only("sort: -:2: disorder: A\n");
}
#[test]
fn test_dictionary_and_nonprinting_conflicts() {
let conflicting_args = ["n", "h", "g", "M"];