summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-07-05 13:00:03 -0600
committerKarl Williamson <khw@cpan.org>2017-07-12 21:14:25 -0600
commitb39a36941224113cceab40de28a787d572c9d707 (patch)
treeaeb2da22052935d1d83aeb5602201302899808a3 /ext
parent404a1403f230a499ebbd08ad7ed02da2e30951d9 (diff)
downloadperl-b39a36941224113cceab40de28a787d572c9d707.tar.gz
APItest/t/utf8_warn_base.pl: Skip inappropriate tests
If we don't have enough information for the test to be meaningful, don't bother doing it.
Diffstat (limited to 'ext')
-rw-r--r--ext/XS-APItest/t/utf8_warn_base.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/XS-APItest/t/utf8_warn_base.pl b/ext/XS-APItest/t/utf8_warn_base.pl
index aa9dabf1b7..7a13c2f917 100644
--- a/ext/XS-APItest/t/utf8_warn_base.pl
+++ b/ext/XS-APItest/t/utf8_warn_base.pl
@@ -1010,6 +1010,13 @@ foreach my $test (@tests) {
if $malformed_allow_type;
}
+ # The whole point of a test that is malformed from the beginning
+ # is to test for that malformation. If we've modified things so
+ # much that we don't have enough information to detect that
+ # malformation, there's no point in testing.
+ next if $initially_malformed
+ && $this_expected_len < $this_needed_to_discern_len;
+
# Here, we've transformed the input with all of the desired
# non-overflow malformations. We are now in a position to
# construct any potential warnings for those malformations. But