In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/eac006c9b5f4ca1954ec680fed91d18a53c763e1?hp=342c85242bced7dbfd83bf3d2621282751e996b8>

- Log -----------------------------------------------------------------
commit eac006c9b5f4ca1954ec680fed91d18a53c763e1
Author: Karl Williamson <pub...@khwilliamson.com>
Date:   Mon Apr 11 12:11:06 2011 -0600

    Add test for [perl #87812]
    
    This makes sure that no case insensitive match of a Latin1 character
    causes the utf8_heavy code to be loaded.
-----------------------------------------------------------------------

Summary of changes:
 MANIFEST          |    1 +
 t/re/no_utf8_pm.t |   12 ++++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 t/re/no_utf8_pm.t

diff --git a/MANIFEST b/MANIFEST
index 27a9e75..0e02719 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -5022,6 +5022,7 @@ t/porting/test_bootstrap.t        Test that the 
instructions for test bootstrapping are
 t/README                       Instructions for regression tests
 t/re/charset.t                 See if regex modifiers like /d, /u work properly
 t/re/fold_grind.t              See if case folding works properly
+t/re/no_utf8_pm.t              Verify utf8.pm doesn't get loaded unless 
required
 t/re/overload.t                Test against string corruption in pattern 
matches on overloaded objects
 t/re/pat_advanced.t            See if advanced esoteric patterns work
 t/re/pat_advanced_thr.t                See if advanced esoteric patterns work 
in another thread
diff --git a/t/re/no_utf8_pm.t b/t/re/no_utf8_pm.t
new file mode 100644
index 0000000..8d49751
--- /dev/null
+++ b/t/re/no_utf8_pm.t
@@ -0,0 +1,12 @@
+#!./perl
+
+print "1..1\n";
+
+# Make sure that case-insensitive matching of any Latin1 chars don't load
+# utf8.pm.  We assume that NULL won't force loading utf8.pm, and since it
+# doesn't match any of the other chars, the regexec.c code would try to load
+# a swash if it thought there was one.
+"\0" =~ /[\001-\xFF]/i;
+
+print "not" if exists $INC{"utf8.pm"};
+print "ok 1\n";

--
Perl5 Master Repository

Reply via email to