du: make du -a -s error

This commit is contained in:
oech3
2026-04-20 21:00:14 +09:00
committed by Daniel Hofstetter
parent 53384016c1
commit e50ddecd08
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -1288,6 +1288,7 @@ pub fn uu_app() -> Command {
.short('a')
.long(options::ALL)
.help(translate!("du-help-all"))
.conflicts_with(options::SUMMARIZE)
.action(ArgAction::SetTrue),
)
.arg(
+5
View File
@@ -84,6 +84,11 @@ fn du_basics(s: &str) {
assert_eq!(s, answer);
}
#[test]
fn test_all_summarize() {
new_ucmd!().arg("-a").arg("-s").fails_with_code(1); //clap provided message
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails_with_code(1);