Commit | Line | Data |
00881caa |
1 | #!/usr/bin/perl -w |
ccbd73a4 |
2 | # $Id: /mirror/googlecode/test-more/t/BEGIN_use_ok.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $ |
00881caa |
3 | |
4 | # [rt.cpan.org 28345] |
5 | # |
6 | # A use_ok() inside a BEGIN block lacking a plan would be silently ignored. |
7 | |
8 | BEGIN { |
9 | if( $ENV{PERL_CORE} ) { |
10 | chdir 't'; |
11 | @INC = ('../lib', 'lib'); |
12 | } |
13 | else { |
14 | unshift @INC, 't/lib'; |
15 | } |
16 | } |
17 | |
18 | use Test::More; |
19 | |
20 | my $result; |
21 | BEGIN { |
22 | eval { |
23 | use_ok("Wibble"); |
24 | }; |
25 | $result = $@; |
26 | } |
27 | |
28 | plan tests => 1; |
29 | like $result, '/^You tried to run a test without a plan/'; |