[PATCH] Syncing with Test::Simple 0.19
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / todo.t
CommitLineData
d020a79a 1BEGIN {
2 require Test::Harness;
3 require Test::More;
4
5 if( $Test::Harness::VERSION < 1.23 ) {
6 Test::More->import(skip_all => 'Need the new Test::Harness');
7 }
8 else {
0cd946aa 9 Test::More->import(tests => 13);
d020a79a 10 }
11}
12
13$Why = 'Just testing the todo interface.';
14
15TODO: {
16 local $TODO = $Why;
17
18 fail("Expected failure");
19 fail("Another expected failure");
20}
21
22
23pass("This is not todo");
24
25
26TODO: {
27 local $TODO = $Why;
28
29 fail("Yet another failure");
30}
31
32pass("This is still not todo");
0cd946aa 33
34
35TODO: {
36 local $TODO = "testing that error messages don't leak out of todo";
37
38 ok( 'this' eq 'that', 'ok' );
39
40 like( 'this', '/that/', 'like' );
41 is( 'this', 'that', 'is' );
42 isnt( 'this', 'this', 'isnt' );
43
44 can_ok('Fooble', 'yarble');
45 isa_ok('Fooble', 'yarble');
46 use_ok('Fooble');
47 require_ok('Fooble');
48}