Add standard core test header to Test::Builder::Tester tests.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / plan_no_plan.t
CommitLineData
33459055 1BEGIN {
a9153838 2 if( $ENV{PERL_CORE} ) {
3 chdir 't';
4 @INC = '../lib';
5 }
33459055 6}
7
a9153838 8use Test::More;
33459055 9
a9153838 10BEGIN {
11 if( !$ENV{HARNESS_ACTIVE} && $ENV{PERL_CORE} ) {
12 plan skip_all => "Won't work with t/TEST";
13 }
33459055 14}
15
30e302f8 16plan 'no_plan';
17
33459055 18pass('Just testing');
19ok(1, 'Testing again');
0257f296 20
21{
22 my $warning = '';
23 local $SIG{__WARN__} = sub { $warning = join "", @_ };
24 SKIP: {
25 skip 'Just testing skip with no_plan';
26 fail("So very failed");
27 }
28 is( $warning, '', 'skip with no "how_many" ok with no_plan' );
29
30
31 $warning = '';
32 TODO: {
33 todo_skip "Just testing todo_skip";
34
35 fail("Just testing todo");
36 die "todo_skip should prevent this";
37 pass("Again");
38 }
39 is( $warning, '', 'skip with no "how_many" ok with no_plan' );
40}