This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move t/re/re.t to ext/re/t/re_funcs_u.t, so that it is not part of minitest.
authorNicholas Clark <nick@ccl4.org>
Sun, 6 Mar 2011 18:59:52 +0000 (18:59 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 6 Mar 2011 20:39:57 +0000 (20:39 +0000)
The test file is for functions in the re:: namespace implemented in
universal.c, but needs to load re, which isn't built for minitest. As none of
these functions are used as part of the core's build process, seems best to
move it with all the other tests related to the re extension.

MANIFEST
ext/re/t/re_funcs_u.t [moved from t/re/re.t with 95% similarity]

index 5e114a1..bc8dd0c 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -3546,6 +3546,7 @@ ext/re/t/lexical_debug.t  test that lexical re 'debug' works
 ext/re/t/qr.t                  test that qr// is a Regexp
 ext/re/t/reflags.t             see if re '/xism' pragma works
 ext/re/t/re_funcs.t            See if exportable 're' funcs in re.xs work
 ext/re/t/qr.t                  test that qr// is a Regexp
 ext/re/t/reflags.t             see if re '/xism' pragma works
 ext/re/t/re_funcs.t            See if exportable 're' funcs in re.xs work
+ext/re/t/re_funcs_u.t          See if exportable 're' funcs in universal.c work
 ext/re/t/regop.pl              generate debug output for various patterns
 ext/re/t/regop.t               test RE optimizations by scraping debug output
 ext/re/t/re.t                  see if re pragma works
 ext/re/t/regop.pl              generate debug output for various patterns
 ext/re/t/regop.t               test RE optimizations by scraping debug output
 ext/re/t/re.t                  see if re pragma works
@@ -5050,7 +5051,6 @@ t/re/reg_nc_tie.t         Test the tied methods of Tie::Hash::NamedCapture
 t/re/reg_pmod.t                        See if regexp /p modifier works as expected
 t/re/reg_posixcc.t             See if posix character classes behave consistently
 t/re/reg_unsafe.t              Check for unsafe match vars
 t/re/reg_pmod.t                        See if regexp /p modifier works as expected
 t/re/reg_posixcc.t             See if posix character classes behave consistently
 t/re/reg_unsafe.t              Check for unsafe match vars
-t/re/re.t                      See if exportable 're' funcs in universal.c work
 t/re/re_tests                  Regular expressions for regexp.t
 t/re/rxcode.t                  See if /(?{ code })/ works
 t/re/subst_amp.t               See if $&-related substitution works
 t/re/re_tests                  Regular expressions for regexp.t
 t/re/rxcode.t                  See if /(?{ code })/ works
 t/re/subst_amp.t               See if $&-related substitution works
similarity index 95%
rename from t/re/re.t
rename to ext/re/t/re_funcs_u.t
index 8dd6fc4..dcb35e1 100644 (file)
--- a/t/re/re.t
@@ -1,9 +1,12 @@
 #!./perl
 
 BEGIN {
 #!./perl
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
-    require './test.pl';
+    require Config;
+    if (($Config::Config{'extensions'} !~ /\bre\b/) ){
+       print "1..0 # Skip -- Perl configured without re module\n";
+           exit 0;
+    }
+    require 'test.pl'; # For watchdog
 }
 
 use strict;
 }
 
 use strict;