summaryrefslogtreecommitdiff
path: root/lib/Test/Simple/t/skipall.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Test/Simple/t/skipall.t')
-rw-r--r--lib/Test/Simple/t/skipall.t42
1 files changed, 15 insertions, 27 deletions
diff --git a/lib/Test/Simple/t/skipall.t b/lib/Test/Simple/t/skipall.t
index 1bc170b2ea..5491be126e 100644
--- a/lib/Test/Simple/t/skipall.t
+++ b/lib/Test/Simple/t/skipall.t
@@ -1,4 +1,5 @@
-# $Id$
+#!/usr/bin/perl -w
+
BEGIN {
if( $ENV{PERL_CORE} ) {
chdir 't';
@@ -11,35 +12,22 @@ BEGIN {
use strict;
-# Can't use Test.pm, that's a 5.005 thing.
-package My::Test;
-
-print "1..2\n";
-
-my $test_num = 1;
-# Utility testing functions.
-sub ok ($;$) {
- my($test, $name) = @_;
- my $ok = '';
- $ok .= "not " unless $test;
- $ok .= "ok $test_num";
- $ok .= " - $name" if defined $name;
- $ok .= "\n";
- print $ok;
- $test_num++;
-}
+use Test::More;
+my $Test = Test::Builder->create;
+$Test->plan(tests => 2);
-package main;
-require Test::More;
-
-require Test::Simple::Catch;
-my($out, $err) = Test::Simple::Catch::caught();
-
-Test::More->import('skip_all');
+my $out = '';
+my $err = '';
+{
+ my $tb = Test::More->builder;
+ $tb->output(\$out);
+ $tb->failure_output(\$err);
+ plan 'skip_all';
+}
END {
- My::Test::ok($$out eq "1..0\n");
- My::Test::ok($$err eq "");
+ $Test->is_eq($out, "1..0 # SKIP\n");
+ $Test->is_eq($err, "");
}