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