xref: /openbsd-src/gnu/usr.bin/perl/cpan/Test-Simple/t/Legacy/plan.t (revision 5759b3d249badf144a6240f7eec4dcf9df003e6b)
1#!/usr/bin/perl -w
2
3BEGIN {
4    if( $ENV{PERL_CORE} ) {
5        chdir 't';
6        @INC = '../lib';
7    }
8}
9
10use Test::More;
11
12plan tests => 4;
13eval { plan tests => 4 };
14is( $@, sprintf("You tried to plan twice at %s line %d.\n", $0, __LINE__ - 1),
15    'disallow double plan' );
16eval { plan 'no_plan'  };
17is( $@, sprintf("You tried to plan twice at %s line %d.\n", $0, __LINE__ -1),
18    'disallow changing plan' );
19
20pass('Just testing plan()');
21pass('Testing it some more');
22