Test::Simple/More/Builder/Tutorial 0.41
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / skipall.t
CommitLineData
15db8fc4 1BEGIN {
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 11use strict;
12
3f2ec160 13# Can't use Test.pm, that's a 5.005 thing.
14package My::Test;
15
16print "1..2\n";
17
18my $test_num = 1;
19# Utility testing functions.
20sub 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
32package main;
33require Test::More;
34
33459055 35require Test::Simple::Catch;
36my($out, $err) = Test::Simple::Catch::caught();
3f2ec160 37
38Test::More->import('skip_all');
39
40
41END {
42 My::Test::ok($$out eq "1..0\n");
43 My::Test::ok($$err eq "");
44}