Commit | Line | Data |
33459055 |
1 | #!perl -w |
2 | |
d020a79a |
3 | BEGIN { |
a9153838 |
4 | if( $ENV{PERL_CORE} ) { |
5 | chdir 't'; |
6 | @INC = '../lib'; |
7 | } |
33459055 |
8 | } |
9 | |
10 | BEGIN { |
d020a79a |
11 | require Test::Harness; |
a9153838 |
12 | use Test::More; |
d020a79a |
13 | |
14 | if( $Test::Harness::VERSION < 1.23 ) { |
a9153838 |
15 | plan skip_all => 'Need Test::Harness 1.23 or up'; |
d020a79a |
16 | } |
17 | else { |
a9153838 |
18 | plan tests => 15; |
d020a79a |
19 | } |
20 | } |
21 | |
22 | $Why = 'Just testing the todo interface.'; |
23 | |
24 | TODO: { |
25 | local $TODO = $Why; |
26 | |
27 | fail("Expected failure"); |
28 | fail("Another expected failure"); |
29 | } |
30 | |
31 | |
32 | pass("This is not todo"); |
33 | |
34 | |
35 | TODO: { |
36 | local $TODO = $Why; |
37 | |
38 | fail("Yet another failure"); |
39 | } |
40 | |
41 | pass("This is still not todo"); |
0cd946aa |
42 | |
43 | |
44 | TODO: { |
45 | local $TODO = "testing that error messages don't leak out of todo"; |
46 | |
47 | ok( 'this' eq 'that', 'ok' ); |
48 | |
49 | like( 'this', '/that/', 'like' ); |
50 | is( 'this', 'that', 'is' ); |
51 | isnt( 'this', 'this', 'isnt' ); |
52 | |
53 | can_ok('Fooble', 'yarble'); |
54 | isa_ok('Fooble', 'yarble'); |
55 | use_ok('Fooble'); |
56 | require_ok('Fooble'); |
57 | } |
a9153838 |
58 | |
59 | |
60 | TODO: { |
61 | todo_skip "Just testing todo_skip", 2; |
62 | |
63 | fail("Just testing todo"); |
64 | die "todo_skip should prevent this"; |
65 | pass("Again"); |
66 | } |