This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move tests to pat_advanced.t
authorKarl Williamson <khw@cpan.org>
Thu, 2 Mar 2017 18:19:39 +0000 (11:19 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 1 Jun 2017 14:30:24 +0000 (08:30 -0600)
The next commit will change these tests to require the infrastructure
already available in pat_advanced.t

t/re/pat.t
t/re/pat_advanced.t
t/re/re_tests

index 16bfc8e..3ac95e9 100644 (file)
@@ -23,7 +23,7 @@ BEGIN {
     skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
     skip_all_without_unicode_tables();
 
-plan tests => 837;  # Update this when adding/deleting tests.
+plan tests => 836;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1814,11 +1814,6 @@ EOP
             ok($AE =~ $re, '/[\xE6\s]/i matches \xC6 when in UTF-8');
         }
 
-        {   # [perl #126606 crashed the interpreter
-            no warnings 'deprecated';
-            like("sS", qr/\N{}Ss|/i, "\N{} with empty branch alternation works");
-        }
-
         {
             is(0+("\n" =~ m'\n'), 1, q|m'\n' should interpolate escapes|);
         }
index ea54cff..e192b6a 100644 (file)
@@ -945,6 +945,10 @@ sub run_tests {
                     'Empty string charname produces NOTHING node';
         like "\N{LONG-STR}", qr/^\N{LONG-STR}$/, 'Verify that long string works';
         like "\N{LONG-STR}", qr/^\N{LONG-STR}$/i, 'Verify under folding that long string works';
+        {
+        no warnings 'deprecated';
+        like "\xc4", qr/\N{}\xe4/i, 'Empty \N{} should change /d to /u';
+        }
 
         eval '/(?[[\N{EMPTY-STR}]])/';
         like $@, qr/Zero length \\N\{\}/, 'Verify zero-length return from \N{} correctly fails';
@@ -2407,6 +2411,11 @@ EOF
         like($folded_string, qr/$string\N{}/i, "\\N{} after LATIN SMALL SHARP S transforms /di into /ui, matches 'ss'");
     }
 
+    {   # [perl #126606 crashed the interpreter
+        no warnings 'deprecated';
+        like("sS", qr/\N{}Ss|/i, '\N{} with empty branch alternation works');
+    }
+
     { # Regexp:Grammars was broken:
   # http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2013-06/msg01290.html
         fresh_perl_like('use warnings; "abc" =~ qr{(?&foo){0}abc(?<foo>)}',
index 410fcea..0bd9b55 100644 (file)
@@ -1443,7 +1443,6 @@ foo(\h)bar        foo\tbar        y       $1      \t
 /\N{U+41}\x{c1}/i      a\x{e1} y       $&      a\x{e1}
 /[\N{U+41}\x{c1}]/i    \x{e1}  y       $&      \x{e1}
 '\N{U+41}'     A       y       $&      A               # Even for single quoted patterns
-/\N{}\xe4/i    \xc4    y       $&      \xc4            # Empty \N{} should change /d to /u
 
 [\s][\S]       \x{a0}\x{a0}    n       -       -       # Unicode complements should not match same character