summaryrefslogtreecommitdiff
path: root/dist/Devel-PPPort
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-11-02 21:18:03 -0600
committerKarl Williamson <khw@cpan.org>2019-11-22 06:49:03 -0700
commitc6e41a0a54eceb66483226532b3eb8e032541e26 (patch)
tree5ca87c7cdcb5e22a3895f28cdd6d4aed04bee068 /dist/Devel-PPPort
parent8d83133d4092939786340151d2e2c2790fc72ec9 (diff)
downloadperl-c6e41a0a54eceb66483226532b3eb8e032541e26.tar.gz
D:P: Change to use modern skip functionality
The new skip() has a count of tests. Previously you had to loop yourself.
Diffstat (limited to 'dist/Devel-PPPort')
-rw-r--r--dist/Devel-PPPort/parts/inc/Sv_set4
-rw-r--r--dist/Devel-PPPort/parts/inc/call8
-rw-r--r--dist/Devel-PPPort/parts/inc/cop5
-rw-r--r--dist/Devel-PPPort/parts/inc/format8
-rw-r--r--dist/Devel-PPPort/parts/inc/magic4
-rw-r--r--dist/Devel-PPPort/parts/inc/mess32
-rw-r--r--dist/Devel-PPPort/parts/inc/misc28
-rw-r--r--dist/Devel-PPPort/parts/inc/newSVpv2
-rw-r--r--dist/Devel-PPPort/parts/inc/podtest2
-rw-r--r--dist/Devel-PPPort/parts/inc/ppphtest4
-rw-r--r--dist/Devel-PPPort/parts/inc/utf826
-rw-r--r--dist/Devel-PPPort/t/Sv_set.t4
-rw-r--r--dist/Devel-PPPort/t/call.t8
-rw-r--r--dist/Devel-PPPort/t/cop.t5
-rw-r--r--dist/Devel-PPPort/t/format.t8
-rw-r--r--dist/Devel-PPPort/t/magic.t4
-rw-r--r--dist/Devel-PPPort/t/mess.t32
-rw-r--r--dist/Devel-PPPort/t/misc.t28
-rw-r--r--dist/Devel-PPPort/t/newSVpv.t2
-rw-r--r--dist/Devel-PPPort/t/podtest.t2
-rw-r--r--dist/Devel-PPPort/t/ppphtest.t4
-rw-r--r--dist/Devel-PPPort/t/testutil.pl1
-rw-r--r--dist/Devel-PPPort/t/utf8.t26
23 files changed, 74 insertions, 173 deletions
diff --git a/dist/Devel-PPPort/parts/inc/Sv_set b/dist/Devel-PPPort/parts/inc/Sv_set
index 2e2b0d5b8b..5fbd79513f 100644
--- a/dist/Devel-PPPort/parts/inc/Sv_set
+++ b/dist/Devel-PPPort/parts/inc/Sv_set
@@ -188,9 +188,7 @@ Devel::PPPort::TestSvSTASH_set($bar, 'bar');
ok($bar->x(), 'hacker');
if ( "$]" < '5.007003' ) {
- for (1..10) {
- skip 'skip: no SV_NOSTEAL support', 0;
- }
+ skip 'skip: no SV_NOSTEAL support', 10;
} else {
ok(Devel::PPPort::Test_sv_setsv_SV_NOSTEAL());
diff --git a/dist/Devel-PPPort/parts/inc/call b/dist/Devel-PPPort/parts/inc/call
index bdfe812f06..678df8cadf 100644
--- a/dist/Devel-PPPort/parts/inc/call
+++ b/dist/Devel-PPPort/parts/inc/call
@@ -412,9 +412,7 @@ if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
ok(ref($@), 'False', 'check that $@ contains False object');
ok("$@", "$false", 'check we got the expected object');
} else {
- for (1..7) {
- skip 'skip: no support for references in $@', 0;
- }
+ skip 'skip: no support for references in $@', 7;
}
ok(eval { Devel::PPPort::eval_sv('die', 0); 1 });
@@ -440,9 +438,7 @@ if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
ok(ref($@), 'False', 'check that $@ contains False object');
ok("$@", "$false", 'check we got the expected object');
} else {
- for (1..7) {
- skip 'skip: no support for references in $@', 0;
- }
+ skip 'skip: no support for references in $@', 7;
}
{
diff --git a/dist/Devel-PPPort/parts/inc/cop b/dist/Devel-PPPort/parts/inc/cop
index 061166ab02..e69a17650a 100644
--- a/dist/Devel-PPPort/parts/inc/cop
+++ b/dist/Devel-PPPort/parts/inc/cop
@@ -183,10 +183,7 @@ ok($file =~ /cop/i);
BEGIN {
if ("$]" < 5.006000) {
- # Skip
- for (1..8) {
- ok(1, 1);
- }
+ skip("Perl version too early", 8);
exit;
}
}
diff --git a/dist/Devel-PPPort/parts/inc/format b/dist/Devel-PPPort/parts/inc/format
index 686bcbdfa0..58f2e4c79d 100644
--- a/dist/Devel-PPPort/parts/inc/format
+++ b/dist/Devel-PPPort/parts/inc/format
@@ -94,9 +94,7 @@ OUTPUT:
use Config;
if ("$]" < '5.004') {
- for (1..5) {
- skip 'skip: No newSVpvf support', 0;
- }
+ skip 'skip: No newSVpvf support', 5;
exit;
}
@@ -112,9 +110,7 @@ my $ivsize = $Config::Config{ivsize};
my $ivmax = ($ivsize == 4) ? '2147483647' : ($ivsize == 8) ? '9223372036854775807' : 0;
my $uvmax = ($ivsize == 4) ? '4294967295' : ($ivsize == 8) ? '18446744073709551615' : 0;
if ($ivmax == 0) {
- for (1..2) {
- skip 'skip: unknown ivsize', 0;
- }
+ skip 'skip: unknown ivsize', 2;
} else {
ok(Devel::PPPort::sprintf_ivmax(), $ivmax);
ok(Devel::PPPort::sprintf_uvmax(), $uvmax);
diff --git a/dist/Devel-PPPort/parts/inc/magic b/dist/Devel-PPPort/parts/inc/magic
index bf1a2f391b..9a4f31af1d 100644
--- a/dist/Devel-PPPort/parts/inc/magic
+++ b/dist/Devel-PPPort/parts/inc/magic
@@ -624,9 +624,7 @@ ok(Devel::PPPort::sv_magic_portable($foo));
ok($foo eq 'bar');
if ( "$]" < '5.007003' ) {
- for (1..22) {
- skip 'skip: no SV_NOSTEAL support', 0;
- }
+ skip 'skip: no SV_NOSTEAL support', 22;
} else {
tie my $scalar, 'TieScalarCounter', 10;
my $fetch = $scalar;
diff --git a/dist/Devel-PPPort/parts/inc/mess b/dist/Devel-PPPort/parts/inc/mess
index c23b831d11..efad7bbea8 100644
--- a/dist/Devel-PPPort/parts/inc/mess
+++ b/dist/Devel-PPPort/parts/inc/mess
@@ -443,12 +443,12 @@ if ("$]" >= '5.006') {
if ("$]" < '5.007001' || "$]" > '5.007003') {
ok $@, "\x{100}\n";
} else {
- skip 'skip: broken utf8 support in die hook', 0;
+ skip 'skip: broken utf8 support in die hook', 1;
}
if ("$]" < '5.007001' || "$]" > '5.008') {
ok $die, "\x{100}\n";
} else {
- skip 'skip: broken utf8 support in die hook', 0;
+ skip 'skip: broken utf8 support in die hook', 1;
}
undef $die;
@@ -456,12 +456,12 @@ if ("$]" >= '5.006') {
if ("$]" < '5.007001' || "$]" > '5.007003') {
ok $@ =~ /^\x{100} at \Q$0\E line /;
} else {
- skip 'skip: broken utf8 support in die hook', 0;
+ skip 'skip: broken utf8 support in die hook', 1;
}
if ("$]" < '5.007001' || "$]" > '5.008') {
ok $die =~ /^\x{100} at \Q$0\E line /;
} else {
- skip 'skip: broken utf8 support in die hook', 0;
+ skip 'skip: broken utf8 support in die hook', 1;
}
if ("$]" < '5.007001' || "$]" > '5.008') {
@@ -473,9 +473,7 @@ if ("$]" >= '5.006') {
Devel::PPPort::warn_sv("\x{100}");
ok (my $tmp = $warn) =~ /^\x{100} at \Q$0\E line /;
} else {
- for (1..2) {
- skip 'skip: broken utf8 support in warn hook', 0;
- }
+ skip 'skip: broken utf8 support in warn hook', 2;
}
ok Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
@@ -484,15 +482,11 @@ if ("$]" >= '5.006') {
ok Devel::PPPort::mess_sv("\x{100}", 0) =~ /^\x{100} at \Q$0\E line /;
ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}"}, 1) =~ /^\x{100} at \Q$0\E line /;
} else {
- for (1..12) {
- skip 'skip: no utf8 support', 0;
- }
+ skip 'skip: no utf8 support', 12;
}
if (ord('A') != 65) {
- for (1..24) {
- skip 'skip: no ASCII support', 0;
- }
+ skip 'skip: no ASCII support', 24;
} elsif ( "$]" >= '5.008'
&& "$]" != '5.013000' # Broken in these ranges
&& ! ("$]" >= '5.011005' && "$]" <= '5.012000'))
@@ -540,9 +534,7 @@ if (ord('A') != 65) {
ok $warn =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
if ("$]" < '5.004') {
- for (1..8) {
- skip 'skip: no support for mess_sv', 0;
- }
+ skip 'skip: no support for mess_sv', 8;
}
else {
ok Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
@@ -558,9 +550,7 @@ if (ord('A') != 65) {
ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
}
} else {
- for (1..24) {
- skip 'skip: no support for \N{U+..} syntax', 0;
- }
+ skip 'skip: no support for \N{U+..} syntax', 24;
}
if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
@@ -584,9 +574,7 @@ if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
ok $@ == $obj;
ok $die == $obj;
} else {
- for (1..12) {
- skip 'skip: no support for exceptions', 0;
- }
+ skip 'skip: no support for exceptions', 12;
}
ok !defined eval { Devel::PPPort::croak_no_modify() };
diff --git a/dist/Devel-PPPort/parts/inc/misc b/dist/Devel-PPPort/parts/inc/misc
index 673360b0c0..f3973f4151 100644
--- a/dist/Devel-PPPort/parts/inc/misc
+++ b/dist/Devel-PPPort/parts/inc/misc
@@ -2611,8 +2611,7 @@ if (ivers($]) >= ivers(5.9)) {
ok(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
};
} else {
- ok(1, 1);
- ok(1, 1);
+ skip("Too early perl version", 2);
}
@r = &Devel::PPPort::check_c_array();
@@ -2623,8 +2622,7 @@ ok(!Devel::PPPort::SvRXOK(""));
ok(!Devel::PPPort::SvRXOK(bless [], "Regexp"));
if (ivers($]) < ivers(5.5)) {
- skip 'no qr// objects in this perl', 0;
- skip 'no qr// objects in this perl', 0;
+ skip 'no qr// objects in this perl', 2;
} else {
my $qr = eval 'qr/./';
ok(Devel::PPPort::SvRXOK($qr));
@@ -2764,7 +2762,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
? 0 # Fail on non-ASCII unless unicode
: ($types{"$native:$class"} || 0);
if (ivers($]) < ivers(5.6) && $suffix eq '_uvchr') {
- skip("No UTF-8 on this perl", 0);
+ skip("No UTF-8 on this perl", 1);
next;
}
@@ -2795,7 +2793,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
my $utf8;
if ($skip) {
- skip $skip, 0;
+ skip $skip, 1;
}
else {
$utf8 = quotemeta Devel::PPPort::uvoffuni_to_utf8($i);
@@ -2810,10 +2808,10 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
# -1) causes it to fail
if ($i > 255) {
if ($skip) {
- skip $skip, 0;
+ skip $skip, 1;
}
elsif (ivers($]) >= ivers(5.25.9)) {
- skip("Prints an annoying error message that khw doesn't know how to easily suppress", 0);
+ skip("Prints an annoying error message that khw doesn't know how to easily suppress", 1);
}
else {
my $eval_string = "$fcn(\"$utf8\", -1)";
@@ -2879,9 +2877,7 @@ for $name (keys %case_changing) {
$skip = "Can't do uvchr on a multi-char string";
}
if ($skip) {
- for (1..4) {
- skip $skip, 0;
- }
+ skip $skip, 4;
}
else {
if ($is_cp) {
@@ -2926,9 +2922,7 @@ for $name (keys %case_changing) {
$skip = "Don't try to test shortened single bytes";
}
if ($skip) {
- for (1..4) {
- skip $skip, 0;
- }
+ skip $skip, 4;
}
else {
my $fcn = "to${name}_utf8_safe";
@@ -2953,10 +2947,8 @@ for $name (keys %case_changing) {
else {
ok ($fail, eval 'qr/Malformed UTF-8 character/',
"Gave appropriate error for short char: $original");
- for (1..3) {
- skip("Expected failure means remaining tests for"
- . " this aren't relevant", 0);
- }
+ skip("Expected failure means remaining tests for"
+ . " this aren't relevant", 3);
}
}
}
diff --git a/dist/Devel-PPPort/parts/inc/newSVpv b/dist/Devel-PPPort/parts/inc/newSVpv
index 067f6eb2fd..daf7c1b263 100644
--- a/dist/Devel-PPPort/parts/inc/newSVpv
+++ b/dist/Devel-PPPort/parts/inc/newSVpv
@@ -93,5 +93,5 @@ if ("$]" >= 5.008001) {
ok(utf8::is_utf8($s[0]));
}
else {
- skip("skip: no is_utf8()", 0);
+ skip("skip: no is_utf8()", 1);
}
diff --git a/dist/Devel-PPPort/parts/inc/podtest b/dist/Devel-PPPort/parts/inc/podtest
index d7255b916f..c44c10d2da 100644
--- a/dist/Devel-PPPort/parts/inc/podtest
+++ b/dist/Devel-PPPort/parts/inc/podtest
@@ -37,7 +37,7 @@ if ($reason) {
for (@pods) {
print "# checking $_\n";
if ($reason) {
- skip("skip: $reason", 0);
+ skip("skip: $reason", 1);
}
else {
pod_file_ok($_);
diff --git a/dist/Devel-PPPort/parts/inc/ppphtest b/dist/Devel-PPPort/parts/inc/ppphtest
index c1194ef566..03c3257bcd 100644
--- a/dist/Devel-PPPort/parts/inc/ppphtest
+++ b/dist/Devel-PPPort/parts/inc/ppphtest
@@ -13,9 +13,7 @@
BEGIN {
if ($ENV{'SKIP_SLOW_TESTS'}) {
- for (1 .. 238) {
- skip("skip: SKIP_SLOW_TESTS", 0);
- }
+ skip("skip: SKIP_SLOW_TESTS", 238);
exit 0;
}
}
diff --git a/dist/Devel-PPPort/parts/inc/utf8 b/dist/Devel-PPPort/parts/inc/utf8
index 108fa3d1bc..2821ba7f3b 100644
--- a/dist/Devel-PPPort/parts/inc/utf8
+++ b/dist/Devel-PPPort/parts/inc/utf8
@@ -641,9 +641,7 @@ BEGIN { require warnings if "$]" > '5.006' }
# skip tests on 5.6.0 and earlier, plus 7.0
if ("$]" <= '5.006' || "$]" == '5.007' ) {
- for (1..93) {
- skip 'skip: broken utf8 support', 0;
- }
+ skip 'skip: broken utf8 support', 93;
exit;
}
@@ -660,9 +658,7 @@ ok(! &Devel::PPPort::UVCHR_IS_INVARIANT(0xb6));
ok(! &Devel::PPPort::UVCHR_IS_INVARIANT(0x100));
if ("$]" < '5.006') {
- for (1 ..9) {
- ok(1, 1)
- }
+ skip("Perl version too early", 9);
}
else {
ok(&Devel::PPPort::UVCHR_SKIP(ord("A")), 1);
@@ -674,7 +670,7 @@ else {
ok(&Devel::PPPort::UVCHR_SKIP(0x3FFFFFF), ord("A") == 65 ? 5 : 6);
ok(&Devel::PPPort::UVCHR_SKIP(0x4000000), ord("A") == 65 ? 6 : 7);
if (ord("A") != 65) {
- ok(1, 1)
+ skip("Test not valid on EBCDIC", 1)
}
else {
ok(&Devel::PPPort::UVCHR_SKIP(0xFFFFFFFF), 7);
@@ -682,9 +678,7 @@ else {
}
if ("$]" < '5.008') {
- for (1 ..3) {
- ok(1, 1)
- }
+ skip("Perl version too early", 3);
}
else {
ok(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{101}", 3, 1), 1);
@@ -709,9 +703,7 @@ ok($ret->[0], 0);
ok($ret->[1], 1);
if (ord("A") != 65) { # tests not valid for EBCDIC
- for (1 .. (2 + 4 + (7 * 5))) {
- ok(1, 1);
- }
+ skip("Perl version too early", 1 .. (2 + 4 + (7 * 5)));
}
else {
$ret = &Devel::PPPort::utf8_to_uvchr_buf("\xc4\x80", 0);
@@ -784,9 +776,7 @@ else {
use vars '%Config';
if ($Config{ccflags} =~ /-DDEBUGGING/) {
shift @buf_tests;
- for (1..5) {
- ok(1, 1);
- }
+ skip("Test not valid on DEBUGGING builds", 5);
}
my $test;
@@ -857,9 +847,7 @@ if ("$]" ge '5.008') {
ok(tied($scalar)->{fetch}, 3);
ok(tied($scalar)->{store}, 0);
} else {
- for (1..23) {
- skip 'skip: no SV_NOSTEAL support', 0;
- }
+ skip 'skip: no SV_NOSTEAL support', 23;
}
package TieScalarCounter;
diff --git a/dist/Devel-PPPort/t/Sv_set.t b/dist/Devel-PPPort/t/Sv_set.t
index d1096287b6..c56e23147b 100644
--- a/dist/Devel-PPPort/t/Sv_set.t
+++ b/dist/Devel-PPPort/t/Sv_set.t
@@ -66,9 +66,7 @@ Devel::PPPort::TestSvSTASH_set($bar, 'bar');
ok($bar->x(), 'hacker');
if ( "$]" < '5.007003' ) {
- for (1..10) {
- skip 'skip: no SV_NOSTEAL support', 0;
- }
+ skip 'skip: no SV_NOSTEAL support', 10;
} else {
ok(Devel::PPPort::Test_sv_setsv_SV_NOSTEAL());
diff --git a/dist/Devel-PPPort/t/call.t b/dist/Devel-PPPort/t/call.t
index efac7391b0..273c8e6a2e 100644
--- a/dist/Devel-PPPort/t/call.t
+++ b/dist/Devel-PPPort/t/call.t
@@ -126,9 +126,7 @@ if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
ok(ref($@), 'False', 'check that $@ contains False object');
ok("$@", "$false", 'check we got the expected object');
} else {
- for (1..7) {
- skip 'skip: no support for references in $@', 0;
- }
+ skip 'skip: no support for references in $@', 7;
}
ok(eval { Devel::PPPort::eval_sv('die', 0); 1 });
@@ -154,9 +152,7 @@ if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
ok(ref($@), 'False', 'check that $@ contains False object');
ok("$@", "$false", 'check we got the expected object');
} else {
- for (1..7) {
- skip 'skip: no support for references in $@', 0;
- }
+ skip 'skip: no support for references in $@', 7;
}
{
diff --git a/dist/Devel-PPPort/t/cop.t b/dist/Devel-PPPort/t/cop.t
index 2849a19844..a78fa9de9b 100644
--- a/dist/Devel-PPPort/t/cop.t
+++ b/dist/Devel-PPPort/t/cop.t
@@ -66,10 +66,7 @@ ok($file =~ /cop/i);
BEGIN {
if ("$]" < 5.006000) {
- # Skip
- for (1..8) {
- ok(1, 1);
- }
+ skip("Perl version too early", 8);
exit;
}
}
diff --git a/dist/Devel-PPPort/t/format.t b/dist/Devel-PPPort/t/format.t
index 2014ed5616..07fe3d25bd 100644
--- a/dist/Devel-PPPort/t/format.t
+++ b/dist/Devel-PPPort/t/format.t
@@ -55,9 +55,7 @@ package main;
use Config;
if ("$]" < '5.004') {
- for (1..5) {
- skip 'skip: No newSVpvf support', 0;
- }
+ skip 'skip: No newSVpvf support', 5;
exit;
}
@@ -73,9 +71,7 @@ my $ivsize = $Config::Config{ivsize};
my $ivmax = ($ivsize == 4) ? '2147483647' : ($ivsize == 8) ? '9223372036854775807' : 0;
my $uvmax = ($ivsize == 4) ? '4294967295' : ($ivsize == 8) ? '18446744073709551615' : 0;
if ($ivmax == 0) {
- for (1..2) {
- skip 'skip: unknown ivsize', 0;
- }
+ skip 'skip: unknown ivsize', 2;
} else {
ok(Devel::PPPort::sprintf_ivmax(), $ivmax);
ok(Devel::PPPort::sprintf_uvmax(), $uvmax);
diff --git a/dist/Devel-PPPort/t/magic.t b/dist/Devel-PPPort/t/magic.t
index c2cb4d35ec..2987746dd5 100644
--- a/dist/Devel-PPPort/t/magic.t
+++ b/dist/Devel-PPPort/t/magic.t
@@ -123,9 +123,7 @@ ok(Devel::PPPort::sv_magic_portable($foo));
ok($foo eq 'bar');
if ( "$]" < '5.007003' ) {
- for (1..22) {
- skip 'skip: no SV_NOSTEAL support', 0;
- }
+ skip 'skip: no SV_NOSTEAL support', 22;
} else {
tie my $scalar, 'TieScalarCounter', 10;
my $fetch = $scalar;
diff --git a/dist/Devel-PPPort/t/mess.t b/dist/Devel-PPPort/t/mess.t
index 42e5f31602..a0279cafa2 100644
--- a/dist/Devel-PPPort/t/mess.t
+++ b/dist/Devel-PPPort/t/mess.t
@@ -182,12 +182,12 @@ if ("$]" >= '5.006') {
if ("$]" < '5.007001' || "$]" > '5.007003') {
ok $@, "\x{100}\n";
} else {
- skip 'skip: broken utf8 support in die hook', 0;
+ skip 'skip: broken utf8 support in die hook', 1;
}
if ("$]" < '5.007001' || "$]" > '5.008') {
ok $die, "\x{100}\n";
} else {
- skip 'skip: broken utf8 support in die hook', 0;
+ skip 'skip: broken utf8 support in die hook', 1;
}
undef $die;
@@ -195,12 +195,12 @@ if ("$]" >= '5.006') {
if ("$]" < '5.007001' || "$]" > '5.007003') {
ok $@ =~ /^\x{100} at \Q$0\E line /;
} else {
- skip 'skip: broken utf8 support in die hook', 0;
+ skip 'skip: broken utf8 support in die hook', 1;
}
if ("$]" < '5.007001' || "$]" > '5.008') {
ok $die =~ /^\x{100} at \Q$0\E line /;
} else {
- skip 'skip: broken utf8 support in die hook', 0;
+ skip 'skip: broken utf8 support in die hook', 1;
}
if ("$]" < '5.007001' || "$]" > '5.008') {
@@ -212,9 +212,7 @@ if ("$]" >= '5.006') {
Devel::PPPort::warn_sv("\x{100}");
ok (my $tmp = $warn) =~ /^\x{100} at \Q$0\E line /;
} else {
- for (1..2) {
- skip 'skip: broken utf8 support in warn hook', 0;
- }
+ skip 'skip: broken utf8 support in warn hook', 2;
}
ok Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
@@ -223,15 +221,11 @@ if ("$]" >= '5.006') {
ok Devel::PPPort::mess_sv("\x{100}", 0) =~ /^\x{100} at \Q$0\E line /;
ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}"}, 1) =~ /^\x{100} at \Q$0\E line /;
} else {
- for (1..12) {
- skip 'skip: no utf8 support', 0;
- }
+ skip 'skip: no utf8 support', 12;
}
if (ord('A') != 65) {
- for (1..24) {
- skip 'skip: no ASCII support', 0;
- }
+ skip 'skip: no ASCII support', 24;
} elsif ( "$]" >= '5.008'
&& "$]" != '5.013000' # Broken in these ranges
&& ! ("$]" >= '5.011005' && "$]" <= '5.012000'))
@@ -279,9 +273,7 @@ if (ord('A') != 65) {
ok $warn =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
if ("$]" < '5.004') {
- for (1..8) {
- skip 'skip: no support for mess_sv', 0;
- }
+ skip 'skip: no support for mess_sv', 8;
}
else {
ok Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
@@ -297,9 +289,7 @@ if (ord('A') != 65) {
ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
}
} else {
- for (1..24) {
- skip 'skip: no support for \N{U+..} syntax', 0;
- }
+ skip 'skip: no support for \N{U+..} syntax', 24;
}
if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
@@ -323,9 +313,7 @@ if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
ok $@ == $obj;
ok $die == $obj;
} else {
- for (1..12) {
- skip 'skip: no support for exceptions', 0;
- }
+ skip 'skip: no support for exceptions', 12;
}
ok !defined eval { Devel::PPPort::croak_no_modify() };
diff --git a/dist/Devel-PPPort/t/misc.t b/dist/Devel-PPPort/t/misc.t
index e187e1d7fb..c006162cc9 100644
--- a/dist/Devel-PPPort/t/misc.t
+++ b/dist/Devel-PPPort/t/misc.t
@@ -139,8 +139,7 @@ if (ivers($]) >= ivers(5.9)) {
ok(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
};
} else {
- ok(1, 1);
- ok(1, 1);
+ skip("Too early perl version", 2);
}
@r = &Devel::PPPort::check_c_array();
@@ -151,8 +150,7 @@ ok(!Devel::PPPort::SvRXOK(""));
ok(!Devel::PPPort::SvRXOK(bless [], "Regexp"));
if (ivers($]) < ivers(5.5)) {
- skip 'no qr// objects in this perl', 0;
- skip 'no qr// objects in this perl', 0;
+ skip 'no qr// objects in this perl', 2;
} else {
my $qr = eval 'qr/./';
ok(Devel::PPPort::SvRXOK($qr));
@@ -292,7 +290,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
? 0 # Fail on non-ASCII unless unicode
: ($types{"$native:$class"} || 0);
if (ivers($]) < ivers(5.6) && $suffix eq '_uvchr') {
- skip("No UTF-8 on this perl", 0);
+ skip("No UTF-8 on this perl", 1);
next;
}
@@ -323,7 +321,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
my $utf8;
if ($skip) {
- skip $skip, 0;
+ skip $skip, 1;
}
else {
$utf8 = quotemeta Devel::PPPort::uvoffuni_to_utf8($i);
@@ -338,10 +336,10 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
# -1) causes it to fail
if ($i > 255) {
if ($skip) {
- skip $skip, 0;
+ skip $skip, 1;
}
elsif (ivers($]) >= ivers(5.25.9)) {
- skip("Prints an annoying error message that khw doesn't know how to easily suppress", 0);
+ skip("Prints an annoying error message that khw doesn't know how to easily suppress", 1);
}
else {
my $eval_string = "$fcn(\"$utf8\", -1)";
@@ -407,9 +405,7 @@ for $name (keys %case_changing) {
$skip = "Can't do uvchr on a multi-char string";
}
if ($skip) {
- for (1..4) {
- skip $skip, 0;
- }
+ skip $skip, 4;
}
else {
if ($is_cp) {
@@ -454,9 +450,7 @@ for $name (keys %case_changing) {
$skip = "Don't try to test shortened single bytes";
}
if ($skip) {
- for (1..4) {
- skip $skip, 0;
- }
+ skip $skip, 4;
}
else {
my $fcn = "to${name}_utf8_safe";
@@ -481,10 +475,8 @@ for $name (keys %case_changing) {
else {
ok ($fail, eval 'qr/Malformed UTF-8 character/',
"Gave appropriate error for short char: $original");
- for (1..3) {
- skip("Expected failure means remaining tests for"
- . " this aren't relevant", 0);
- }
+ skip("Expected failure means remaining tests for"
+ . " this aren't relevant", 3);
}
}
}
diff --git a/dist/Devel-PPPort/t/newSVpv.t b/dist/Devel-PPPort/t/newSVpv.t
index 8e7c14d566..80a67a9ec7 100644
--- a/dist/Devel-PPPort/t/newSVpv.t
+++ b/dist/Devel-PPPort/t/newSVpv.t
@@ -77,6 +77,6 @@ if ("$]" >= 5.008001) {
ok(utf8::is_utf8($s[0]));
}
else {
- skip("skip: no is_utf8()", 0);
+ skip("skip: no is_utf8()", 1);
}
diff --git a/dist/Devel-PPPort/t/podtest.t b/dist/Devel-PPPort/t/podtest.t
index 7aea495c56..98698ad73a 100644
--- a/dist/Devel-PPPort/t/podtest.t
+++ b/dist/Devel-PPPort/t/podtest.t
@@ -78,7 +78,7 @@ if ($reason) {
for (@pods) {
print "# checking $_\n";
if ($reason) {
- skip("skip: $reason", 0);
+ skip("skip: $reason", 1);
}
else {
pod_file_ok($_);
diff --git a/dist/Devel-PPPort/t/ppphtest.t b/dist/Devel-PPPort/t/ppphtest.t
index 17f71f524b..0d133d5542 100644
--- a/dist/Devel-PPPort/t/ppphtest.t
+++ b/dist/Devel-PPPort/t/ppphtest.t
@@ -54,9 +54,7 @@ package main;
BEGIN {
if ($ENV{'SKIP_SLOW_TESTS'}) {
- for (1 .. 238) {
- skip("skip: SKIP_SLOW_TESTS", 0);
- }
+ skip("skip: SKIP_SLOW_TESTS", 238);
exit 0;
}
}
diff --git a/dist/Devel-PPPort/t/testutil.pl b/dist/Devel-PPPort/t/testutil.pl
index 0bc0508219..eeaa701cf3 100644
--- a/dist/Devel-PPPort/t/testutil.pl
+++ b/dist/Devel-PPPort/t/testutil.pl
@@ -385,7 +385,6 @@ sub skip {
my $n = @_ ? shift : 1;
my $bad_swap;
my $both_zero;
- $n = 1 if $n == 0; # XXX Temporary
{
local $^W = 0;
$bad_swap = $why > 0 && $n == 0;
diff --git a/dist/Devel-PPPort/t/utf8.t b/dist/Devel-PPPort/t/utf8.t
index a74ad21a9f..c9034266a2 100644
--- a/dist/Devel-PPPort/t/utf8.t
+++ b/dist/Devel-PPPort/t/utf8.t
@@ -56,9 +56,7 @@ BEGIN { require warnings if "$]" > '5.006' }
# skip tests on 5.6.0 and earlier, plus 7.0
if ("$]" <= '5.006' || "$]" == '5.007' ) {
- for (1..93) {
- skip 'skip: broken utf8 support', 0;
- }
+ skip 'skip: broken utf8 support', 93;
exit;
}
@@ -75,9 +73,7 @@ ok(! &Devel::PPPort::UVCHR_IS_INVARIANT(0xb6));
ok(! &Devel::PPPort::UVCHR_IS_INVARIANT(0x100));
if ("$]" < '5.006') {
- for (1 ..9) {
- ok(1, 1)
- }
+ skip("Perl version too early", 9);
}
else {
ok(&Devel::PPPort::UVCHR_SKIP(ord("A")), 1);
@@ -89,7 +85,7 @@ else {
ok(&Devel::PPPort::UVCHR_SKIP(0x3FFFFFF), ord("A") == 65 ? 5 : 6);
ok(&Devel::PPPort::UVCHR_SKIP(0x4000000), ord("A") == 65 ? 6 : 7);
if (ord("A") != 65) {
- ok(1, 1)
+ skip("Test not valid on EBCDIC", 1)
}
else {
ok(&Devel::PPPort::UVCHR_SKIP(0xFFFFFFFF), 7);
@@ -97,9 +93,7 @@ else {
}
if ("$]" < '5.008') {
- for (1 ..3) {
- ok(1, 1)
- }
+ skip("Perl version too early", 3);
}
else {
ok(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{101}", 3, 1), 1);
@@ -124,9 +118,7 @@ ok($ret->[0], 0);
ok($ret->[1], 1);
if (ord("A") != 65) { # tests not valid for EBCDIC
- for (1 .. (2 + 4 + (7 * 5))) {
- ok(1, 1);
- }
+ skip("Perl version too early", 1 .. (2 + 4 + (7 * 5)));
}
else {
$ret = &Devel::PPPort::utf8_to_uvchr_buf("\xc4\x80", 0);
@@ -199,9 +191,7 @@ else {
use vars '%Config';
if ($Config{ccflags} =~ /-DDEBUGGING/) {
shift @buf_tests;
- for (1..5) {
- ok(1, 1);
- }
+ skip("Test not valid on DEBUGGING builds", 5);
}
my $test;
@@ -272,9 +262,7 @@ if ("$]" ge '5.008') {
ok(tied($scalar)->{fetch}, 3);
ok(tied($scalar)->{store}, 0);
} else {
- for (1..23) {
- skip 'skip: no SV_NOSTEAL support', 0;
- }
+ skip 'skip: no SV_NOSTEAL support', 23;
}
package TieScalarCounter;