summaryrefslogtreecommitdiff
path: root/tests/tr/Test.pm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tr/Test.pm')
-rw-r--r--tests/tr/Test.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tr/Test.pm b/tests/tr/Test.pm
index 7b25a156e..cf7021397 100644
--- a/tests/tr/Test.pm
+++ b/tests/tr/Test.pm
@@ -139,8 +139,20 @@ my @tv = (
# Up to coreutils-6.9, tr rejected an unmatched [:lower:] or [:upper:] in SET1.
['s1-lower', q|'[:lower:]' '[.*]'|, '#$%123abcABC', '#$%123...ABC', 0],
['s1-upper', q|'[:upper:]' '[.*]'|, '#$%123abcABC', '#$%123abc...', 0],
+
+# Up to coreutils-6.9.91, this would fail with the diagnostic:
+# tr: misaligned [:upper:] and/or [:lower:] construct
+# with LC_CTYPE=en_US.iso88591.
+['tolower-F',q|'[:upper:]' '[:lower:]'|, 'A', 'a', 0],
+
+# When doing a case-converting translation with something after the
+# [:upper:] and [:lower:] elements, ensure that tr honors the following byte.
+['upcase-xtra',q|'[:lower:].' '[:upper:]x'|, 'abc.', 'ABCx', 0],
+['dncase-xtra',q|'[:upper:].' '[:lower:]x'|, 'ABC.', 'abcx', 0],
);
+$Test::env{'tolower-F'} = ['LC_CTYPE=en_US.iso88591'];
+
sub test_vector
{
my $t;