This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest/t/utf8.t: Better handle some platforms
authorKarl Williamson <khw@cpan.org>
Sun, 14 May 2017 04:53:47 +0000 (22:53 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 13 Jul 2017 03:14:24 +0000 (21:14 -0600)
A future commit will cause some expected errors to not actually be
errors on some platforms.  This detects and handles these.

ext/XS-APItest/t/utf8.t

index 5562dca..06ee298 100644 (file)
@@ -939,6 +939,12 @@ for my $restriction (sort keys %restriction_types) {
                                         = 0 if $operand eq "fixed_width_buf";
                             }
                         }
+                        elsif (! exists $restriction_types
+                                    {$this_error_type}{'first_invalid_count'})
+                        {
+                            # If no errors were found, this is entirely valid.
+                            $this_error_type = 0;
+                        }
                         else {
 
                             if (! exists $restriction_types{$this_error_type}) {