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

tr: forbid backwards ranges

This commit is contained in:
Andrew Liebenow 2024-10-12 01:40:05 -05:00
parent a696e609eb
commit 0bf5a68c54
2 changed files with 38 additions and 1 deletions

View file

@ -1500,3 +1500,15 @@ fn test_multibyte_octal_sequence() {
// ")
.stdout_is("Ł)");
}
#[test]
fn test_backwards_range() {
new_ucmd!()
.args(&["-d", r"\046-\048"])
.pipe_in("")
.fails()
.stderr_only(
r"tr: range-endpoints of '&-\004' are in reverse collating sequence order
",
);
}