Commit | Line | Data |
---|---|---|
b7f9bbeb | 1 | #!/usr/bin/perl -w |
2 | ||
15db8fc4 | 3 | BEGIN { |
a9153838 | 4 | if( $ENV{PERL_CORE} ) { |
5 | chdir 't'; | |
6 | @INC = ('../lib', 'lib'); | |
7 | } | |
8 | else { | |
9 | unshift @INC, 't/lib'; | |
10 | } | |
15db8fc4 | 11 | } |
12 | ||
b7f9bbeb | 13 | use Test::More tests => 6; |
4dd974da | 14 | |
b7f9bbeb | 15 | my $tb = Test::Builder->create; |
16 | $tb->level(0); | |
4dd974da | 17 | |
b7f9bbeb | 18 | #line 19 |
19 | ok !eval { $tb->plan(tests => undef) }; | |
20 | is($@, "Got an undefined number of tests at $0 line 19.\n"); | |
4dd974da | 21 | |
b7f9bbeb | 22 | #line 23 |
23 | ok !eval { $tb->plan(tests => 0) }; | |
24 | is($@, "You said to run 0 tests at $0 line 23.\n"); | |
4dd974da | 25 | |
b7f9bbeb | 26 | #line 27 |
27 | ok !eval { $tb->ok(1) }; | |
28 | is( $@, "You tried to run a test without a plan at $0 line 27.\n"); |