mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tr: enable passing -c multiple times
This commit is contained in:
parent
5a2e0c700e
commit
d9b6675bbf
2 changed files with 11 additions and 1 deletions
|
@ -170,7 +170,8 @@ pub fn uu_app() -> Command {
|
||||||
.short('c')
|
.short('c')
|
||||||
.long(options::COMPLEMENT)
|
.long(options::COMPLEMENT)
|
||||||
.help("use the complement of SET1")
|
.help("use the complement of SET1")
|
||||||
.action(ArgAction::SetTrue),
|
.action(ArgAction::SetTrue)
|
||||||
|
.overrides_with(options::COMPLEMENT),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(options::DELETE)
|
Arg::new(options::DELETE)
|
||||||
|
|
|
@ -118,6 +118,15 @@ fn test_complement5() {
|
||||||
.stdout_is("0a1b2c3");
|
.stdout_is("0a1b2c3");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_complement_multi_early() {
|
||||||
|
new_ucmd!()
|
||||||
|
.args(&["-c", "-c", "a", "X"])
|
||||||
|
.pipe_in("ab")
|
||||||
|
.succeeds()
|
||||||
|
.stdout_is("aX");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_squeeze() {
|
fn test_squeeze() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue