mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fix duplicate flags
This commit is contained in:
parent
c20f009da4
commit
3e6187269e
3 changed files with 20 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,17 @@ 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", "alice_in_wonderland.txt"])
|
||||||
|
.run()
|
||||||
|
.stdout_is(
|
||||||
|
"Alice was beginning to get very tired of sitting by\n\
|
||||||
|
her sister on the bank, and of having nothing to do: once or twice\n\
|
||||||
|
she had peeped into the book her sister was reading, but it had no\n\
|
||||||
|
pictures or conversations in it, \"and what is the use of a book,\"\n\
|
||||||
|
thought Alice \"without pictures or conversation?\"\n",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
5
tests/fixtures/expand/alice_in_wonderland.txt
vendored
Normal file
5
tests/fixtures/expand/alice_in_wonderland.txt
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Alice was beginning to get very tired of sitting by
|
||||||
|
her sister on the bank, and of having nothing to do: once or twice
|
||||||
|
she had peeped into the book her sister was reading, but it had no
|
||||||
|
pictures or conversations in it, "and what is the use of a book,"
|
||||||
|
thought Alice "without pictures or conversation?"
|
Loading…
Add table
Add a link
Reference in a new issue