Skip to content

Commit 9237013

Browse files
Fix additional tr bugs
1 parent 7440e70 commit 9237013

File tree

2 files changed

+198
-262
lines changed

2 files changed

+198
-262
lines changed

text/tests/tr/mod.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,3 +371,19 @@ fn tr_reverse_order_simple() {
371371
fn tr_duplicate_string1_character_precedence() {
372372
tr_test(&["AA", "CB"], "AAAA", "BBBB");
373373
}
374+
375+
// Prevent regression to:
376+
//
377+
// Error: Missing symbol after '['
378+
#[test]
379+
fn tr_left_square_bracket_literal() {
380+
tr_test(&["1", "["], "123", "[23");
381+
}
382+
383+
// Prevent regression to:
384+
//
385+
// Error: Missing '*' after '[' for symbol ':'
386+
#[test]
387+
fn tr_multiple_transformations() {
388+
tr_test(&["3[:lower:]", "![:upper:]"], "abc123", "ABC12!");
389+
}

0 commit comments

Comments
 (0)