mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tr: enable passing -s multiple times
This commit is contained in:
+2
-1
@@ -191,7 +191,8 @@ pub fn uu_app() -> Command {
|
||||
listed in the last specified SET, with a single occurrence \
|
||||
of that character",
|
||||
)
|
||||
.action(ArgAction::SetTrue),
|
||||
.action(ArgAction::SetTrue)
|
||||
.overrides_with(options::SQUEEZE),
|
||||
)
|
||||
.arg(
|
||||
Arg::new(options::TRUNCATE_SET1)
|
||||
|
||||
@@ -182,7 +182,16 @@ fn test_squeeze() {
|
||||
new_ucmd!()
|
||||
.args(&["-s", "a-z"])
|
||||
.pipe_in("aaBBcDcc")
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is("aBBcDc");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_squeeze_multi() {
|
||||
new_ucmd!()
|
||||
.args(&["-ss", "-s", "a-z"])
|
||||
.pipe_in("aaBBcDcc")
|
||||
.succeeds()
|
||||
.stdout_is("aBBcDc");
|
||||
}
|
||||
|
||||
@@ -191,7 +200,16 @@ fn test_squeeze_complement() {
|
||||
new_ucmd!()
|
||||
.args(&["-sc", "a-z"])
|
||||
.pipe_in("aaBBcDcc")
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is("aaBcDcc");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_squeeze_complement_multi() {
|
||||
new_ucmd!()
|
||||
.args(&["-scsc", "a-z"]) // spell-checker:disable-line
|
||||
.pipe_in("aaBBcDcc")
|
||||
.succeeds()
|
||||
.stdout_is("aaBcDcc");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user