summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-02-04 11:04:25 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-02-04 11:04:25 +0000
commitd12e50cf45149336efec3161d04293f1ae511ed7 (patch)
treece843752d4a3969989647728a3fd93a29ebf821a /t
parent68b871bb4a348d153c096d0edd21e3147f4c7025 (diff)
downloadperl-d12e50cf45149336efec3161d04293f1ae511ed7.tar.gz
Fix "[perl #20667] unicode regex vs non-unicode regex".
The PL_regdata was not set up (S_cache_re()) before it was needed (S_reginclass()). The test put in fresh_perl.t because we need a pristine state to start. p4raw-id: //depot/perl@18653
Diffstat (limited to 't')
-rw-r--r--t/run/fresh_perl.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t
index 9c3e55c4ef..a07396f419 100644
--- a/t/run/fresh_perl.t
+++ b/t/run/fresh_perl.t
@@ -807,3 +807,15 @@ utf8::upgrade($_); # the original code used a UTF-8 locale (affects STDIN)
# is what matters.
/^([[:digit:]]+)/;
EXPECT
+######## [perl #20667] unicode regex vs non-unicode regex
+$toto = 'Hello';
+$toto =~ /\w/; # this line provokes the problem!
+$name = 'A B';
+# utf8::upgrade($name) if @ARGV;
+if ($name =~ /(\p{IsUpper}) (\p{IsUpper})/){
+ print "It's good! >$1< >$2<\n";
+} else {
+ print "It's not good...\n";
+}
+EXPECT
+It's good! >A< >B<