Upgrade to Test-Simple-0.82.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / skipall.t
1 # $Id: /mirror/googlecode/test-more/t/skipall.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51  $
2 BEGIN {
3     if( $ENV{PERL_CORE} ) {
4         chdir 't';
5         @INC = ('../lib', 'lib');
6     }
7     else {
8         unshift @INC, 't/lib';
9     }
10 }   
11
12 use strict;
13
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) = @_;
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;
29     $test_num++;
30 }
31
32
33 package main;
34 require Test::More;
35
36 require Test::Simple::Catch;
37 my($out, $err) = Test::Simple::Catch::caught();
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 }