summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-10 21:49:30 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-10 21:49:30 +0000
commit31067593099812ab8537bff185cb527dc1190f67 (patch)
treefea3e32ea6bdba635a0817d51ef7c191fc654915
parentd56c570797c673478b3a116a0ec3f47317f46643 (diff)
downloadperl-31067593099812ab8537bff185cb527dc1190f67.tar.gz
Add the test case for #7190, from the original bug report
by Andreas König. p4raw-id: //depot/perl@7197
-rwxr-xr-xt/pragma/utf8.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/pragma/utf8.t b/t/pragma/utf8.t
index fd1abbb11c..1b6ca915ab 100755
--- a/t/pragma/utf8.t
+++ b/t/pragma/utf8.t
@@ -10,7 +10,7 @@ BEGIN {
}
}
-print "1..70\n";
+print "1..72\n";
my $test = 1;
@@ -322,6 +322,7 @@ sub nok_bytes {
ok "@a", "1234 2345";
$test++; # 68
}
+
{
my($a,$b);
{ use bytes; $a = "\xc3\xa4"; }
@@ -329,3 +330,17 @@ sub nok_bytes {
{ use bytes; ok_bytes $a, $b; $test++; } # 69
{ use utf8; nok $a, $b; $test++; } # 70
}
+
+{
+ my @x = ("stra\337e 138","stra\337e 138");
+ for (@x) {
+ s/(\d+)\s*([\w\-]+)/$1 . uc $2/e;
+ my($latin) = /^(.+)(?:\s+\d)/;
+ print $latin eq "stra\337e" ? "ok $test\n" :
+ "#latin[$latin]\nnot ok $test\n";
+ $test++;
+ $latin =~ s/stra\337e/straße/; # \303\237 after the 2nd a
+ use utf8;
+ $latin =~ s!(s)tr(?:aß|s+e)!$1tr.!; # \303\237 after the a
+ }
+}