summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-10-08 23:58:54 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2014-10-08 23:59:10 +0200
commit3fe9640a0f236b8040d4fab3b85a439db0b15680 (patch)
treea250f7c448f17fc474e3f2742c36caa443fd590b /t
parentbbddd987604157f505a568731c0691e4f64b10d1 (diff)
downloadperl-3fe9640a0f236b8040d4fab3b85a439db0b15680.tar.gz
Special test preambles needed for these.
Diffstat (limited to 't')
-rw-r--r--t/lib/mypragma.t8
-rw-r--r--t/re/pat_advanced.t21
2 files changed, 15 insertions, 14 deletions
diff --git a/t/lib/mypragma.t b/t/lib/mypragma.t
index 2e7b0ab301..eb93e7cd6a 100644
--- a/t/lib/mypragma.t
+++ b/t/lib/mypragma.t
@@ -1,15 +1,15 @@
#!./perl
-use strict;
-use warnings;
-
BEGIN {
chdir 't' if -d 't';
require './test.pl';
- @INC = '../lib';
+ @INC = qw(lib ../lib);
plan(tests => 14);
}
+use strict;
+use warnings;
+
use mypragma (); # don't enable this pragma yet
BEGIN {
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t
index 6fd5f2437e..cb11f2750d 100644
--- a/t/re/pat_advanced.t
+++ b/t/re/pat_advanced.t
@@ -4,24 +4,22 @@
# the format supported by re/regexp.t. If you want to add a test
# that does fit that format, add it to re/re_tests, not here.
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = qw(../lib .);
+ require './test.pl';
+ require './charset_tools.pl';
+ skip_all_if_miniperl("miniperl can't load Tie::Hash::NamedCapture, need for %+ and %-");
+}
+
use strict;
use warnings;
use 5.010;
-
sub run_tests;
$| = 1;
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
- require './test.pl';
- require './charset_tools.pl';
- skip_all_if_miniperl("miniperl can't load Tie::Hash::NamedCapture, need for %+ and %-");
-}
-
run_tests() unless caller;
#
@@ -985,6 +983,9 @@ sub run_tests {
}
{
+ BEGIN {
+ unshift @INC, 'lib';
+ }
use Cname;
ok 'fooB' =~ /\N{foo}[\N{B}\N{b}]/, "Passthrough charname";