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