summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-11-01 17:57:15 -0600
committerKarl Williamson <public@khwilliamson.com>2011-11-01 18:55:11 -0600
commitbbdd8bad57f8d77a4e6c3725a49d4d3589efedd7 (patch)
treef63993a16adba176733a4fec012b7378ae786c7c /t
parente2760528720bf060a1f8246c3c77820e4aed7448 (diff)
downloadperl-bbdd8bad57f8d77a4e6c3725a49d4d3589efedd7.tar.gz
PATCH: [perl #101710] Regression with /i, latin1 chars.
The root cause of this bug is that it was assuming that a string was in utf8 when it wasn't, and so was thinking that a byte was a starter byte that wasn't, so was skipping ahead based on that starter byte.
Diffstat (limited to 't')
-rw-r--r--t/re/pat.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/re/pat.t b/t/re/pat.t
index ed87f07701..54d44ac046 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -21,7 +21,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 463; # Update this when adding/deleting tests.
+plan tests => 464; # Update this when adding/deleting tests.
run_tests() unless caller;
@@ -1208,6 +1208,13 @@ EOP
sprintf("'U+%04X not legal IDFirst'", ord($char)));
}
}
+
+ { # [perl #101710]
+ my $pat = "b";
+ utf8::upgrade($pat);
+ like("\xffb", qr/$pat/i, "/i: utf8 pattern, non-utf8 string, latin1-char preceding matching char in string");
+ }
+
} # End of sub run_tests
1;