diff options
author | Nicolas R <atoomic@cpan.org> | 2016-08-18 11:14:51 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-08-18 11:14:57 +1000 |
commit | 624c42e21a507311daed2012be92ca7adec9b65f (patch) | |
tree | 16f913214f5c84b2c73ab909d7275ed9088fde6e /t/op/defins.t | |
parent | fb9b5c74fb7605d3882509c33d3d353e88a7c253 (diff) | |
download | perl-624c42e21a507311daed2012be92ca7adec9b65f.tar.gz |
Use set_up_inc for several unit tests
Use set_up_inc when require.pl is loaded
move plan outside of BEGIN block
when no tests are run at BEGIN time.
Using set_up_inc allow to run these tests under minitest
but also compile them using B::C.
This also has the advantage to use a single
control point for @INC setup.
Note: some tests cannot use 'require test.pl',
unshfit is then used for them.
Diffstat (limited to 't/op/defins.t')
-rw-r--r-- | t/op/defins.t | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/t/op/defins.t b/t/op/defins.t index 86e0dd8287..fb746d5f93 100644 --- a/t/op/defins.t +++ b/t/op/defins.t @@ -6,10 +6,11 @@ BEGIN { chdir 't' if -d 't'; - @INC = qw(. ../lib); + require './test.pl'; + set_up_inc( qw(. ../lib) ); $SIG{__WARN__} = sub { $warns++; warn $_[0] }; } -require './test.pl'; + plan( tests => 27 ); my $unix_mode = 1; |