diff options
Diffstat (limited to 't')
-rw-r--r-- | t/lib/mypragma.t | 8 | ||||
-rw-r--r-- | t/re/pat_advanced.t | 21 |
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"; |