mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
chmod: allow verbose and quiet flags to be used more than once
This commit is contained in:
parent
3554565c82
commit
d9a21ff8f0
2 changed files with 22 additions and 0 deletions
|
@ -110,6 +110,7 @@ pub fn uu_app() -> Command {
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.override_usage(format_usage(USAGE))
|
.override_usage(format_usage(USAGE))
|
||||||
|
.args_override_self(true)
|
||||||
.infer_long_args(true)
|
.infer_long_args(true)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(options::CHANGES)
|
Arg::new(options::CHANGES)
|
||||||
|
|
|
@ -650,3 +650,24 @@ fn test_chmod_file_symlink_after_non_existing_file() {
|
||||||
0o100764
|
0o100764
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_quiet_n_verbose_used_multiple_times() {
|
||||||
|
let scene = TestScenario::new(util_name!());
|
||||||
|
let at = &scene.fixtures;
|
||||||
|
at.touch("file");
|
||||||
|
scene
|
||||||
|
.ucmd()
|
||||||
|
.arg("u+x")
|
||||||
|
.arg("--verbose")
|
||||||
|
.arg("--verbose")
|
||||||
|
.arg("file")
|
||||||
|
.succeeds();
|
||||||
|
scene
|
||||||
|
.ucmd()
|
||||||
|
.arg("u+x")
|
||||||
|
.arg("--quiet")
|
||||||
|
.arg("--quiet")
|
||||||
|
.arg("file")
|
||||||
|
.succeeds();
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue