mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 12:37:49 +00:00
Merge pull request #5671 from Yykz/wc_args_override
wc: fix arguments not overriding
This commit is contained in:
commit
ece9e91593
2 changed files with 14 additions and 0 deletions
|
@ -395,6 +395,7 @@ pub fn uu_app() -> Command {
|
|||
.about(ABOUT)
|
||||
.override_usage(format_usage(USAGE))
|
||||
.infer_long_args(true)
|
||||
.args_override_self(true)
|
||||
.arg(
|
||||
Arg::new(options::BYTES)
|
||||
.short('c')
|
||||
|
|
|
@ -725,3 +725,16 @@ fn files0_from_dir() {
|
|||
.fails()
|
||||
.stderr_only(dir_err!("-"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_args_override() {
|
||||
new_ucmd!()
|
||||
.args(&["-ll", "-l", "alice_in_wonderland.txt"])
|
||||
.run()
|
||||
.stdout_is("5 alice_in_wonderland.txt\n");
|
||||
|
||||
new_ucmd!()
|
||||
.args(&["--total=always", "--total=never", "alice_in_wonderland.txt"])
|
||||
.run()
|
||||
.stdout_is(" 5 57 302 alice_in_wonderland.txt\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue