This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rewhack Test-Simple into core harness.
[perl5.git] / lib / Test / Simple / t / skipall.t
1 use strict;
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6 }
7
8 # Can't use Test.pm, that's a 5.005 thing.
9 package My::Test;
10
11 print "1..2\n";
12
13 my $test_num = 1;
14 # Utility testing functions.
15 sub ok ($;$) {
16     my($test, $name) = @_;
17     my $ok = '';
18     $ok .= "not " unless $test;
19     $ok .= "ok $test_num";
20     $ok .= " - $name" if defined $name;
21     $ok .= "\n";
22     print $ok;
23     $test_num++;
24 }
25
26
27 package main;
28 require Test::More;
29
30 push @INC, '../t/lib';
31 require Test::Simple::Catch::More;
32 my($out, $err) = Test::Simple::Catch::More::caught();
33
34 Test::More->import('skip_all');
35
36
37 END {
38     My::Test::ok($$out eq "1..0\n");
39     My::Test::ok($$err eq "");
40 }