This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #122655] 5.20 regression: '"X" !~ /[x]/i'
[perl5.git] / t / re / pat.t
index ec4eea0..770a45a 100644 (file)
@@ -20,7 +20,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 737;  # Update this when adding/deleting tests.
+plan tests => 738;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1606,6 +1606,12 @@ EOP
         ok('a<b>c' =~ qr<a\<b\>c>, "'\\<' is a literal in qr<...>)");
     }
 
+    {   # Was getting optimized into EXACT (non-folding node)
+        my $x = qr/[x]/i;
+        utf8::upgrade($x);
+        like("X", qr/$x/, "UTF-8 of /[x]/i matches upper case");
+    }
+
 } # End of sub run_tests
 
 1;