mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
cut: allow the same option to be passed multiple times
This commit is contained in:
parent
7b34e3e4bb
commit
bc51b8d216
2 changed files with 11 additions and 0 deletions
|
@ -510,6 +510,7 @@ pub fn uu_app() -> Command {
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.after_help(AFTER_HELP)
|
.after_help(AFTER_HELP)
|
||||||
.infer_long_args(true)
|
.infer_long_args(true)
|
||||||
|
.args_override_self(true)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(options::BYTES)
|
Arg::new(options::BYTES)
|
||||||
.short('b')
|
.short('b')
|
||||||
|
|
|
@ -255,3 +255,13 @@ fn test_equal_as_delimiter3() {
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_only_bytes("abZcd\n");
|
.stdout_only_bytes("abZcd\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_multiple() {
|
||||||
|
let result = new_ucmd!()
|
||||||
|
.args(&["-f2", "-d:", "-d="])
|
||||||
|
.pipe_in("a=b\n")
|
||||||
|
.succeeds();
|
||||||
|
assert_eq!(result.stdout_str(), "b\n");
|
||||||
|
assert_eq!(result.stderr_str(), "");
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue