Upgrade to Test-Simple-0.64_02
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / no_plan.t
CommitLineData
b7f9bbeb 1#!/usr/bin/perl -w
2
15db8fc4 3BEGIN {
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 13use Test::More tests => 6;
4dd974da 14
b7f9bbeb 15my $tb = Test::Builder->create;
16$tb->level(0);
4dd974da 17
b7f9bbeb 18#line 19
19ok !eval { $tb->plan(tests => undef) };
20is($@, "Got an undefined number of tests at $0 line 19.\n");
4dd974da 21
b7f9bbeb 22#line 23
23ok !eval { $tb->plan(tests => 0) };
24is($@, "You said to run 0 tests at $0 line 23.\n");
4dd974da 25
b7f9bbeb 26#line 27
27ok !eval { $tb->ok(1) };
28is( $@, "You tried to run a test without a plan at $0 line 27.\n");