diff options
Diffstat (limited to 'cpan/Test-Simple/t/Legacy/BEGIN_use_ok.t')
-rw-r--r-- | cpan/Test-Simple/t/Legacy/BEGIN_use_ok.t | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cpan/Test-Simple/t/Legacy/BEGIN_use_ok.t b/cpan/Test-Simple/t/Legacy/BEGIN_use_ok.t new file mode 100644 index 0000000000..476badf7a2 --- /dev/null +++ b/cpan/Test-Simple/t/Legacy/BEGIN_use_ok.t @@ -0,0 +1,26 @@ +#!/usr/bin/perl -w + +# [rt.cpan.org 28345] +# +# A use_ok() inside a BEGIN block lacking a plan would be silently ignored. + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't'; + @INC = ('../lib', 'lib'); + } + else { + unshift @INC, 't/lib'; + } +} + +use Test::More; + +my $result; +BEGIN { + $result = use_ok("strict"); +} + +ok( $result, "use_ok() ran" ); +done_testing(2); + |