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

id: mark passwd-format and pretty-print as conflicting

These are non-sensical to combine, and didn't work reasonably anyway.
Also, passwd-formatting is our own extension, so there is no need for
compatibility anyway.
This commit is contained in:
Ben Wiederhake 2024-04-28 23:05:43 +02:00
parent e978fe5382
commit 4f5a3b4716
2 changed files with 14 additions and 0 deletions

View file

@ -461,3 +461,16 @@ fn test_id_no_specified_user_posixly() {
}
}
}
#[test]
#[cfg(all(unix, not(target_os = "android")))]
fn test_id_pretty_print_password_record() {
// `-p` is BSD only and not supported on GNU's `id`.
// `-P` is our own extension, and not supported by either GNU nor BSD.
// These must conflict, because they both set the output format.
new_ucmd!()
.arg("-p")
.arg("-P")
.fails()
.stderr_contains("the argument '-p' cannot be used with '-P'");
}