From: Karl Williamson Date: Mon, 11 Apr 2011 18:11:06 +0000 (-0600) Subject: Add test for [perl #87812] X-Git-Tag: accepted/trunk/20130322.191538~4452 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eac006c9b5f4ca1954ec680fed91d18a53c763e1;p=platform%2Fupstream%2Fperl.git 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. --- 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";