Upgrade to Test-Simple-0.82.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / plan_no_plan.t
1 # $Id: /mirror/googlecode/test-more/t/plan_no_plan.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51  $
2 BEGIN {
3     if( $ENV{PERL_CORE} ) {
4         chdir 't';
5         @INC = '../lib';
6     }
7 }
8
9 use Test::More;
10
11 BEGIN {
12     if( !$ENV{HARNESS_ACTIVE} && $ENV{PERL_CORE} ) {
13         plan skip_all => "Won't work with t/TEST";
14     }
15 }
16
17 plan 'no_plan';
18
19 pass('Just testing');
20 ok(1, 'Testing again');
21
22 {
23     my $warning = '';
24     local $SIG{__WARN__} = sub { $warning = join "", @_ };
25     SKIP: {
26         skip 'Just testing skip with no_plan';
27         fail("So very failed");
28     }
29     is( $warning, '', 'skip with no "how_many" ok with no_plan' );
30
31
32     $warning = '';
33     TODO: {
34         todo_skip "Just testing todo_skip";
35
36         fail("Just testing todo");
37         die "todo_skip should prevent this";
38         pass("Again");
39     }
40     is( $warning, '', 'skip with no "how_many" ok with no_plan' );
41 }