Upgrade to Test-Simple-0.82.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / plan_no_plan.t
CommitLineData
ccbd73a4 1# $Id: /mirror/googlecode/test-more/t/plan_no_plan.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $
33459055 2BEGIN {
a9153838 3 if( $ENV{PERL_CORE} ) {
4 chdir 't';
5 @INC = '../lib';
6 }
33459055 7}
8
a9153838 9use Test::More;
33459055 10
a9153838 11BEGIN {
12 if( !$ENV{HARNESS_ACTIVE} && $ENV{PERL_CORE} ) {
13 plan skip_all => "Won't work with t/TEST";
14 }
33459055 15}
16
30e302f8 17plan 'no_plan';
18
33459055 19pass('Just testing');
20ok(1, 'Testing again');
0257f296 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}