Upgrade to Test-Simple-0.82.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / skipall.t
CommitLineData
ccbd73a4 1# $Id: /mirror/googlecode/test-more/t/skipall.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $
15db8fc4 2BEGIN {
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 12use strict;
13
3f2ec160 14# Can't use Test.pm, that's a 5.005 thing.
15package My::Test;
16
17print "1..2\n";
18
19my $test_num = 1;
20# Utility testing functions.
21sub 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
33package main;
34require Test::More;
35
33459055 36require Test::Simple::Catch;
37my($out, $err) = Test::Simple::Catch::caught();
3f2ec160 38
39Test::More->import('skip_all');
40
41
42END {
43 My::Test::ok($$out eq "1..0\n");
44 My::Test::ok($$err eq "");
45}