summaryrefslogtreecommitdiff
path: root/lib/Test
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-04-13 09:02:05 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-04-13 09:02:05 +0000
commit0bf5423d74320816c45cb6728cc5a2f9e033afca (patch)
tree8155bc80f3780b83f2829772b71706c28f3483fe /lib/Test
parent835bc3f3709faed7fcdc19f9e1d8703aa21e0355 (diff)
downloadperl-0bf5423d74320816c45cb6728cc5a2f9e033afca.tar.gz
Upgrade to Test::Harness 2.27_04.
p4raw-id: //depot/perl@19195
Diffstat (limited to 'lib/Test')
-rw-r--r--lib/Test/Harness.pm5
-rw-r--r--lib/Test/Harness/Straps.pm4
-rw-r--r--lib/Test/Harness/t/pod.t20
-rw-r--r--lib/Test/Harness/t/test-harness.t18
4 files changed, 42 insertions, 5 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm
index 50de3b55da..b954626552 100644
--- a/lib/Test/Harness.pm
+++ b/lib/Test/Harness.pm
@@ -1,5 +1,5 @@
# -*- Mode: cperl; cperl-indent-level: 4 -*-
-# $Id: Harness.pm,v 1.43 2003/03/24 20:09:50 andy Exp $
+# $Id: Harness.pm,v 1.45 2003/04/13 03:34:09 andy Exp $
package Test::Harness;
@@ -22,7 +22,7 @@ use vars qw($VERSION $Verbose $Switches $Have_Devel_Corestack $Curtest
$Have_Devel_Corestack = 0;
-$VERSION = '2.27_02';
+$VERSION = '2.27_04';
$ENV{HARNESS_ACTIVE} = 1;
@@ -328,6 +328,7 @@ It returns true if everything was ok. Otherwise it will die() with
one of the messages in the DIAGNOSTICS section.
=for _private
+
This is just _run_all_tests() plus _show_results()
=cut
diff --git a/lib/Test/Harness/Straps.pm b/lib/Test/Harness/Straps.pm
index 6ce6b2d258..dc3e4b644a 100644
--- a/lib/Test/Harness/Straps.pm
+++ b/lib/Test/Harness/Straps.pm
@@ -1,5 +1,5 @@
# -*- Mode: cperl; cperl-indent-level: 4 -*-
-# $Id: Straps.pm,v 1.16 2003/02/02 05:27:44 schwern Exp $
+# $Id: Straps.pm,v 1.17 2003/04/03 17:47:25 andy Exp $
package Test::Harness::Straps;
@@ -324,7 +324,7 @@ sub _switches {
local *TEST;
open(TEST, $file) or print "can't open $file. $!\n";
my $first = <TEST>;
- my $s = '';
+ my $s = $Test::Harness::Switches || '';
$s .= " $ENV{'HARNESS_PERL_SWITCHES'}"
if exists $ENV{'HARNESS_PERL_SWITCHES'};
diff --git a/lib/Test/Harness/t/pod.t b/lib/Test/Harness/t/pod.t
new file mode 100644
index 0000000000..5a048b2fcc
--- /dev/null
+++ b/lib/Test/Harness/t/pod.t
@@ -0,0 +1,20 @@
+use Test::More;
+
+use File::Spec;
+use File::Find;
+use strict;
+
+eval "use Test::Pod 0.95";
+
+if ($@) {
+ plan skip_all => "Test::Pod v0.95 required for testing POD";
+} else {
+ Test::Pod->import;
+ my @files;
+ my $blib = File::Spec->catfile(qw(blib lib));
+ find( sub {push @files, $File::Find::name if /\.p(l|m|od)$/}, $blib);
+ plan tests => scalar @files;
+ foreach my $file (@files) {
+ pod_file_ok($file);
+ }
+}
diff --git a/lib/Test/Harness/t/test-harness.t b/lib/Test/Harness/t/test-harness.t
index f8d8c281c7..8a5f687fdb 100644
--- a/lib/Test/Harness/t/test-harness.t
+++ b/lib/Test/Harness/t/test-harness.t
@@ -452,13 +452,29 @@ my %samples = (
},
all_ok => 0,
},
+ switches => {
+ total => {
+ bonus => 0,
+ max => 1,
+ 'ok' => 1,
+ files => 1,
+ bad => 0,
+ good => 1,
+ tests => 1,
+ sub_skipped=> 0,
+ 'todo' => 0,
+ skipped => 0,
+ },
+ failed => { },
+ all_ok => 1,
+ },
);
plan tests => (keys(%samples) * 8) + 1;
use Test::Harness;
use_ok('Test::Harness');
-
+$Test::Harness::Switches = '"-Mstrict"';
tie *NULL, 'My::Dev::Null' or die $!;