Debian lenny version packages
[pkg-perl] / deb-src / libtest-simple-perl / libtest-simple-perl-0.80 / t / skipall.t
1 BEGIN {
2     if( $ENV{PERL_CORE} ) {
3         chdir 't';
4         @INC = ('../lib', 'lib');
5     }
6     else {
7         unshift @INC, 't/lib';
8     }
9 }   
10
11 use strict;
12
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) = @_;
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;
28     $test_num++;
29 }
30
31
32 package main;
33 require Test::More;
34
35 require Test::Simple::Catch;
36 my($out, $err) = Test::Simple::Catch::caught();
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 }