mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tr: correctly handle multibyte octal sequences
This commit is contained in:
parent
654581ac77
commit
a696e609eb
2 changed files with 60 additions and 5 deletions
|
@ -1487,3 +1487,16 @@ fn test_trailing_backslash() {
|
|||
.stderr_is("tr: warning: an unescaped backslash at end of string is not portable\n")
|
||||
.stdout_is("abc");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_multibyte_octal_sequence() {
|
||||
new_ucmd!()
|
||||
.args(&["-d", r"\501"])
|
||||
.pipe_in("(1Ł)")
|
||||
.succeeds()
|
||||
// TODO
|
||||
// Cannot log warning because of how nom is parsing the arguments
|
||||
// .stderr_is(r"tr: warning: the ambiguous octal escape \501 is being interpreted as the 2-byte sequence \50, 1
|
||||
// ")
|
||||
.stdout_is("Ł)");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue