4 if( $ENV{PERL_CORE} ) {
15 $Why = 'Just testing the todo interface.';
21 fail("Expected failure");
22 fail("Another expected failure");
24 $is_todo = Test::More->builder->todo;
27 pass("This is not todo");
28 ok( $is_todo, 'TB->todo' );
34 fail("Yet another failure");
37 pass("This is still not todo");
41 local $TODO = "testing that error messages don't leak out of todo";
43 ok( 'this' eq 'that', 'ok' );
45 like( 'this', '/that/', 'like' );
46 is( 'this', 'that', 'is' );
47 isnt( 'this', 'this', 'isnt' );
49 can_ok('Fooble', 'yarble');
50 isa_ok('Fooble', 'yarble');
57 todo_skip "Just testing todo_skip", 2;
59 fail("Just testing todo");
60 die "todo_skip should prevent this";
67 local $SIG{__WARN__} = sub { $warning = join "", @_ };
69 # perl gets the line number a little wrong on the first
70 # statement inside a block.
73 todo_skip "Just testing todo_skip";
74 fail("So very failed");
76 is( $warning, "todo_skip() needs to know \$how_many tests are in the ".
77 "block at $0 line 82\n",
78 'todo_skip without $how_many warning' );