Change -l to conflict with -n and -c

This commit is contained in:
Shun Sakai authored and David Peter committed 2022-03-25 22:00:40 +01:00
1 parent c497c1fac9
commit 7da04c6bff
2 files changed
+25

No files matched your search

+1
View File
@@ -61,6 +61,7 @@ fn run() -> Result<(), AnyhowError> {
.short("l")
.takes_value(true)
.value_name("N")
.conflicts_with_all(&["length", "bytes"])
.hidden(true)
.help("Yet another alias for -n/--length"),
)
+24
View File
@@ -85,6 +85,30 @@ mod length {
.assert()
.failure();
}
#[test]
fn fail_if_length_and_count_options_are_used_simultaneously() {
hexyl()
.arg("hello_world_elf64")
.arg("--length=32")
.arg("-l=10")
.assert()
.failure();
}
}
mod bytes {
use super::hexyl;
#[test]
fn fail_if_bytes_and_count_options_are_used_simultaneously() {
hexyl()
.arg("hello_world_elf64")
.arg("--bytes=32")
.arg("-l=10")
.assert()
.failure();
}
}
mod skip {