1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

tr: enable passing -d multiple times

This commit is contained in:
Ben Wiederhake 2024-02-23 02:24:02 +01:00
parent cad94a69be
commit dc664006fe
2 changed files with 28 additions and 1 deletions

View file

@ -46,6 +46,32 @@ fn test_delete() {
.stdout_is("BD");
}
#[test]
fn test_delete_afterwards_is_not_flag() {
new_ucmd!()
.args(&["a-z", "-d"])
.pipe_in("aBcD")
.succeeds()
.stdout_is("-BdD");
}
#[test]
fn test_delete_multi() {
new_ucmd!()
.args(&["-d", "-d", "a-z"])
.pipe_in("aBcD")
.succeeds()
.stdout_is("BD");
}
#[test]
fn test_delete_late() {
new_ucmd!()
.args(&["-d", "a-z", "-d"])
.fails()
.stderr_contains("extra operand '-d'");
}
#[test]
fn test_delete_complement() {
new_ucmd!()