This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest/t/utf8.t: Rename test for clarity
authorKarl Williamson <khw@cpan.org>
Thu, 6 Oct 2016 00:32:55 +0000 (18:32 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 13 Oct 2016 17:18:12 +0000 (11:18 -0600)
ext/XS-APItest/t/utf8.t

index 41fe9f9..f104c5d 100644 (file)
@@ -1192,7 +1192,13 @@ else {
 foreach my $test (@malformations) {
     my ($testname, $bytes, $length, $allow_flags, $allowed_uv, $expected_len, $message ) = @$test;
 
-    next if ! ok(length($bytes) >= $length, "$testname: Make sure won't read beyond buffer: " . length($bytes) . " >= $length");
+    if (length($bytes) < $length) {
+        fail("Internal test error: actual buffer length (" . length($bytes)
+           . ") must be at least as high as how far we are allowed to read"
+           . " into it ($length)");
+        diag($testname);
+        next;
+    }
 
     undef @warnings;