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