In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e96513a272994fa40337538729c370cb2b01f9fd?hp=b8fffdb01477dabb63e42a81b627c93f7d812bff>

- Log -----------------------------------------------------------------
commit e96513a272994fa40337538729c370cb2b01f9fd
Author: Jarkko Hietaniemi <[email protected]>
Date:   Sat Sep 20 20:41:31 2014 -0400

    Guard against bad skip() arguments, swapped (15ed07b0) or extra.
-----------------------------------------------------------------------

Summary of changes:
 t/test.pl | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/t/test.pl b/t/test.pl
index d9a3220..0cfae31 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -478,6 +478,17 @@ sub next_test {
 sub skip {
     my $why = shift;
     my $n    = @_ ? shift : 1;
+    my $bad_swap;
+    {
+      local $^W = 0;
+      $bad_swap = $why > 0 && $n == 0;
+    }
+    if ($bad_swap) {
+      die qq[$0: expected skip(why, count), got skip($why, "$n")\n];
+    }
+    if (@_) {
+      die qq[$0: expected skip(why, count), got skip($why, "$n", @_)\n];
+    }
     for (1..$n) {
         _print "ok $test # skip $why\n";
         $test = $test + 1;

--
Perl5 Master Repository

Reply via email to