summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-06 16:09:00 +0200
committerNicholas Clark <nick@ccl4.org>2009-10-06 16:09:00 +0200
commitf7b649f061a3f4f4023e8a7183ec774ef01bab60 (patch)
tree3d7547264a447c3ebd6ec1f0c0caaf6e8a556e30 /t
parent6ddfe9e80dcd0e491ed20e28f11a5431e78989aa (diff)
downloadperl-f7b649f061a3f4f4023e8a7183ec774ef01bab60.tar.gz
Standarise t/porting/*.t on ./test.pl, and remove BEGIN boilerplate.
Diffstat (limited to 't')
-rw-r--r--t/porting/args_assert.t4
-rw-r--r--t/porting/diag.t9
-rw-r--r--t/porting/podcheck.t16
3 files changed, 16 insertions, 13 deletions
diff --git a/t/porting/args_assert.t b/t/porting/args_assert.t
index bf42d0f167..95c24f440e 100644
--- a/t/porting/args_assert.t
+++ b/t/porting/args_assert.t
@@ -3,7 +3,9 @@
use strict;
use warnings;
-use Test::More 'no_plan';
+require './test.pl';
+
+plan('no_plan');
# Fail for every PERL_ARGS_ASSERT* macro that was declared but not used.
diff --git a/t/porting/diag.t b/t/porting/diag.t
index 907c7f964c..8b7edb61d1 100644
--- a/t/porting/diag.t
+++ b/t/porting/diag.t
@@ -1,7 +1,11 @@
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More 'no_plan';
+
+require './test.pl';
+
+plan('no_plan');
+
$|=1;
my $make_exceptions_list = ($ARGV[0]||'') eq '--make-exceptions-list';
@@ -147,7 +151,8 @@ sub check_file {
if (exists $entries{$name}) {
if ($entries{$name}{todo}) {
TODO: {
- local $TODO = 'in DATA';
+ no warnings 'once';
+ local $::TODO = 'in DATA';
fail("Presence of '$name' from $codefn line $.");
}
} else {
diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t
index 25677612c6..4dde790adb 100644
--- a/t/porting/podcheck.t
+++ b/t/porting/podcheck.t
@@ -1,8 +1,6 @@
#!/usr/bin/perl -w
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
+
+require './test.pl';
use strict;
@@ -14,8 +12,6 @@ BEGIN {
require overload;
};
-use Test::More;
-
{
package My::Pod::Checker;
use strict;
@@ -63,15 +59,15 @@ sub pod_ok {
$checker->parse_from_file($filename, undef);
my $error_count = $checker->num_errors();
- if(! ok $error_count <= 0, "POD of $filename") {
+ if(! ok($error_count <= 0, "POD of $filename")) {
diag( "'$filename' contains POD errors" );
- diag sprintf "%s %s: %s at line %s",
- $_->{-severity}, $_->{-file}, $_->{-msg}, $_->{-line}
+ diag(sprintf "%s %s: %s at line %s",
+ $_->{-severity}, $_->{-file}, $_->{-msg}, $_->{-line})
for @My::Pod::Checker::errors;
};
};
-plan tests => scalar @files;
+plan (tests => scalar @files);
pod_ok $_
for @files;