This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
allow test.pl tests to use C<< plan skip_all => $reason >>
authorTony Cook <tony@develop-help.com>
Wed, 2 Jul 2014 00:30:07 +0000 (10:30 +1000)
committerTony Cook <tony@develop-help.com>
Wed, 2 Jul 2014 00:30:07 +0000 (10:30 +1000)
This pointless incompatibility with Test::More has resulted in
many annoyingly broken test scripts.

MANIFEST
t/test.pl
t/test_pl/plan_skip_all.t [new file with mode: 0644]

index 150cd5c..b5a980a 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -5327,6 +5327,7 @@ t/TEST                            The regression tester
 t/test.pl                      Simple testing library
 t/test_pl/can_isa_ok.t         Tests for the simple testing library
 t/test_pl/_num_to_alpha.t      Tests for the simple testing library 
+t/test_pl/plan_skip_all.t      Tests for the simple testing library
 t/test_pl/tempfile.t           Tests for the simple testing library
 t/thread_it.pl                 Run regression tests in a new thread
 t/uni/attrs.t                  See if Unicode attributes work
index 342cfdc..13db432 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -53,6 +53,7 @@ sub plan {
        }
     } else {
        my %plan = @_;
+       $plan{skip_all} and skip_all($plan{skip_all});
        $n = $plan{tests};
     }
     _print "1..$n\n" unless $noplan;
diff --git a/t/test_pl/plan_skip_all.t b/t/test_pl/plan_skip_all.t
new file mode 100644 (file)
index 0000000..fddb8f0
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/env perl -w
+use strict;
+use warnings;
+
+BEGIN { require "test.pl"; }
+
+plan skip_all => "Test Test::More compatible plan skip_all => \$foo";