Add the original source packages to maemo, source lenny
[dh-make-perl] / dev / i386 / libtest-simple-perl / libtest-simple-perl-0.80 / t / no_plan.t
1 #!/usr/bin/perl -w
2
3 BEGIN {
4     if( $ENV{PERL_CORE} ) {
5         chdir 't';
6         @INC = ('../lib', 'lib');
7     }
8     else {
9         unshift @INC, 't/lib';
10     }
11 }
12
13 use Test::More tests => 6;
14
15 my $tb = Test::Builder->create;
16 $tb->level(0);
17
18 #line 19
19 ok !eval { $tb->plan(tests => undef) };
20 is($@, "Got an undefined number of tests at $0 line 19.\n");
21
22 #line 23
23 ok !eval { $tb->plan(tests => 0) };
24 is($@, "You said to run 0 tests at $0 line 23.\n");
25
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");