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

tr: forbid non-numeric repeat counts

This commit is contained in:
Andrew Liebenow 2024-10-12 03:44:46 -05:00
parent 0bf5a68c54
commit e53dd5ffe1
2 changed files with 19 additions and 3 deletions

View file

@ -1512,3 +1512,12 @@ fn test_backwards_range() {
",
);
}
#[test]
fn test_non_digit_repeat() {
new_ucmd!()
.args(&["a", "[b*c]"])
.pipe_in("")
.fails()
.stderr_only("tr: invalid repeat count 'c' in [c*n] construct\n");
}