Commit | Line | Data |
ccbd73a4 |
1 | # $Id: /mirror/googlecode/test-more/t/skipall.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $ |
15db8fc4 |
2 | BEGIN { |
a9153838 |
3 | if( $ENV{PERL_CORE} ) { |
4 | chdir 't'; |
5 | @INC = ('../lib', 'lib'); |
6 | } |
7 | else { |
8 | unshift @INC, 't/lib'; |
9 | } |
10 | } |
15db8fc4 |
11 | |
33459055 |
12 | use strict; |
13 | |
3f2ec160 |
14 | # Can't use Test.pm, that's a 5.005 thing. |
15 | package My::Test; |
16 | |
17 | print "1..2\n"; |
18 | |
19 | my $test_num = 1; |
20 | # Utility testing functions. |
21 | sub ok ($;$) { |
22 | my($test, $name) = @_; |
1af51bd3 |
23 | my $ok = ''; |
24 | $ok .= "not " unless $test; |
25 | $ok .= "ok $test_num"; |
26 | $ok .= " - $name" if defined $name; |
27 | $ok .= "\n"; |
28 | print $ok; |
3f2ec160 |
29 | $test_num++; |
30 | } |
31 | |
32 | |
33 | package main; |
34 | require Test::More; |
35 | |
33459055 |
36 | require Test::Simple::Catch; |
37 | my($out, $err) = Test::Simple::Catch::caught(); |
3f2ec160 |
38 | |
39 | Test::More->import('skip_all'); |
40 | |
41 | |
42 | END { |
43 | My::Test::ok($$out eq "1..0\n"); |
44 | My::Test::ok($$err eq ""); |
45 | } |