1
Fork 0
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:
Sylvestre Ledru 2023-12-21 11:03:09 +01:00 committed by GitHub
commit e071fd3042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -275,6 +275,7 @@ pub fn uu_app() -> Command {
.after_help(LONG_HELP)
.override_usage(format_usage(USAGE))
.infer_long_args(true)
.args_override_self(true)
.arg(
Arg::new(options::INITIAL)
.long(options::INITIAL)

View file

@ -392,3 +392,20 @@ fn test_comma_with_plus_4() {
// 01234567890
.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;
}
",
);
}