summaryrefslogtreecommitdiff
path: root/dist/Devel-PPPort/parts/inc/misc
diff options
context:
space:
mode:
Diffstat (limited to 'dist/Devel-PPPort/parts/inc/misc')
-rw-r--r--dist/Devel-PPPort/parts/inc/misc9
1 files changed, 6 insertions, 3 deletions
diff --git a/dist/Devel-PPPort/parts/inc/misc b/dist/Devel-PPPort/parts/inc/misc
index aa3efb2494..6a070c21d2 100644
--- a/dist/Devel-PPPort/parts/inc/misc
+++ b/dist/Devel-PPPort/parts/inc/misc
@@ -2532,6 +2532,9 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
}
}
else {
+ my $sub_fcn;
+ for $sub_fcn ("") {
+ my $fcn = "Devel::PPPort::is${class}${sub_fcn}_utf8_safe";
my $utf8 = quotemeta Devel::PPPort::uvoffuni_to_utf8($i);
if ("$]" < 5.007 && $native > 255) {
skip("Perls earlier than 5.7 give wrong answers for above Latin1 code points", 0);
@@ -2540,9 +2543,8 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
skip("Perls earlier than 5.11.3 considered high space characters as isPRINT and isGRAPH", 0);
}
else {
-
my $should_be = $types{"$native:$class"} || 0;
- my $eval_string = "Devel::PPPort::is${class}_utf8_safe(\"$utf8\", 0)";
+ my $eval_string = "$fcn(\"$utf8\", 0)";
my $is = eval $eval_string || 0;
die "eval 'For $i, $eval_string' gave $@" if $@;
ok($is, $should_be, sprintf("For U+%04X '%s'", $native, $eval_string));
@@ -2555,12 +2557,13 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
skip("Prints an annoying error message that khw doesn't know how to easily suppress", 0);
}
else {
- my $eval_string = "Devel::PPPort::is${class}_utf8_safe(\"$utf8\", -1)";
+ my $eval_string = "$fcn(\"$utf8\", -1)";
my $is = eval "no warnings; $eval_string" || 0;
die "eval '$eval_string' gave $@" if $@;
ok($is, 0, sprintf("For U+%04X '%s'", $native, $eval_string));
}
}
+ }
}
}
}