mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
Merge pull request #5684 from allaboutevemirolive/v10_expand
expand: fix duplicate flags
This commit is contained in:
commit
e071fd3042
2 changed files with 18 additions and 0 deletions
|
@ -275,6 +275,7 @@ pub fn uu_app() -> Command {
|
||||||
.after_help(LONG_HELP)
|
.after_help(LONG_HELP)
|
||||||
.override_usage(format_usage(USAGE))
|
.override_usage(format_usage(USAGE))
|
||||||
.infer_long_args(true)
|
.infer_long_args(true)
|
||||||
|
.args_override_self(true)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(options::INITIAL)
|
Arg::new(options::INITIAL)
|
||||||
.long(options::INITIAL)
|
.long(options::INITIAL)
|
||||||
|
|
|
@ -392,3 +392,20 @@ fn test_comma_with_plus_4() {
|
||||||
// 01234567890
|
// 01234567890
|
||||||
.stdout_is("a b c");
|
.stdout_is("a b c");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_args_override() {
|
||||||
|
new_ucmd!()
|
||||||
|
.args(&["-i", "-i", "with-trailing-tab.txt"])
|
||||||
|
.run()
|
||||||
|
.stdout_is(
|
||||||
|
"// !note: file contains significant whitespace
|
||||||
|
// * indentation uses <TAB> characters
|
||||||
|
int main() {
|
||||||
|
// * next line has both a leading & trailing tab
|
||||||
|
// with tabs=>
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue