Update to Text::Balanced 1.85.
[p5sagit/p5-mst-13.2.git] / t / lib / test-harness.t
index 4ce6e17..a4c423d 100644 (file)
@@ -1,15 +1,16 @@
-#!./perl
+#!perl
 
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
 }
 
+use strict;
 
 # For shutting up Test::Harness.
 package My::Dev::Null;
 use Tie::Handle;
-@ISA = qw(Tie::StdHandle);
+@My::Dev::Null::ISA = qw(Tie::StdHandle);
 
 sub WRITE { }
 
@@ -41,6 +42,7 @@ sub eqhash {
     return $ok;
 }
 
+use vars qw($Total_tests %samples);
 
 my $loaded;
 BEGIN { $| = 1; $^W = 1; }
@@ -56,7 +58,7 @@ BEGIN {
                 simple            => {
                                       bonus      => 0,
                                       max        => 5,
-                                      ok         => 5,
+                                      'ok'         => 5,
                                       files      => 1,
                                       bad        => 0,
                                       good       => 1,
@@ -67,7 +69,7 @@ BEGIN {
                 simple_fail      => {
                                      bonus       => 0,
                                      max         => 5,
-                                     ok          => 3,
+                                     'ok'          => 3,
                                      files       => 1,
                                      bad         => 1,
                                      good        => 0,
@@ -78,7 +80,7 @@ BEGIN {
                 descriptive       => {
                                       bonus      => 0,
                                       max        => 5,
-                                      ok         => 5,
+                                      'ok'         => 5,
                                       files      => 1,
                                       bad        => 0,
                                       good       => 1,
@@ -89,7 +91,7 @@ BEGIN {
                 no_nums           => {
                                       bonus      => 0,
                                       max        => 5,
-                                      ok         => 4,
+                                      'ok'         => 4,
                                       files      => 1,
                                       bad        => 1,
                                       good       => 0,
@@ -100,7 +102,7 @@ BEGIN {
                 todo              => {
                                       bonus      => 1,
                                       max        => 5,
-                                      ok         => 5,
+                                      'ok'         => 5,
                                       files      => 1,
                                       bad        => 0,
                                       good       => 1,
@@ -111,7 +113,7 @@ BEGIN {
                 skip              => {
                                       bonus      => 0,
                                       max        => 5,
-                                      ok         => 5,
+                                      'ok'         => 5,
                                       files      => 1,
                                       bad        => 0,
                                       good       => 1,
@@ -123,7 +125,7 @@ BEGIN {
                 combined          => {
                                       bonus      => 1,
                                       max        => 10,
-                                      ok         => 8,
+                                      'ok'         => 8,
                                       files      => 1,
                                       bad        => 1,
                                       good       => 0,
@@ -134,7 +136,7 @@ BEGIN {
                 duplicates        => {
                                       bonus      => 0,
                                       max        => 10,
-                                      ok         => 11,
+                                      'ok'         => 11,
                                       files      => 1,
                                       bad        => 1,
                                       good       => 0,
@@ -145,7 +147,7 @@ BEGIN {
                 header_at_end     => {
                                       bonus      => 0,
                                       max        => 4,
-                                      ok         => 4,
+                                      'ok'         => 4,
                                       files      => 1,
                                       bad        => 0,
                                       good       => 1,
@@ -156,7 +158,7 @@ BEGIN {
                 skip_all          => {
                                       bonus      => 0,
                                       max        => 0,
-                                      ok         => 0,
+                                      'ok'         => 0,
                                       files      => 1,
                                       bad        => 0,
                                       good       => 1,
@@ -167,7 +169,7 @@ BEGIN {
                 with_comments     => {
                                       bonus      => 2,
                                       max        => 5,
-                                      ok         => 5,
+                                      'ok'         => 5,
                                       files      => 1,
                                       bad        => 0,
                                       good       => 1,
@@ -183,12 +185,12 @@ BEGIN {
 tie *NULL, 'My::Dev::Null' or die $!;
 
 while (my($test, $expect) = each %samples) {
-    # _runtests() runs the tests but skips the formatting.
+    # _run_all_tests() runs the tests but skips the formatting.
     my($totals, $failed);
     eval {
-        select NULL;    # _runtests() isn't as quiet as it should be.
+        select NULL;    # _run_all_tests() isn't as quiet as it should be.
         ($totals, $failed) = 
-          Test::Harness::_runtests("lib/sample-tests/$test");
+          Test::Harness::_run_all_tests("lib/sample-tests/$test");
     };
     select STDOUT;