APItest/t/utf8_warn_base.pl: Clean up test name
authorKarl Williamson <khw@cpan.org>
Fri, 7 Jul 2017 16:34:01 +0000 (10:34 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 13 Jul 2017 03:14:25 +0000 (21:14 -0600)
This name was confusing, as there are two types of things that can be
(dis)allowed, and in the case of an overflow, the first type is not
being tested but has the adjective (dis)allowed present.  Add the term
only when appropriate.

ext/XS-APItest/t/utf8_warn_base.pl

index 7a13c2f..27537c8 100644 (file)
@@ -1299,11 +1299,13 @@ foreach my $test (@tests) {
                         }
                     }
 
-                    my $this_name = "utf8n_to_uvchr_error() $testname: "
-                                                . (($disallowed)
-                                                   ? 'disallowed'
-                                                   : 'allowed');
-                    $this_name .= ", $eval_warn";
+                    my $this_name = "utf8n_to_uvchr_error() $testname: ";
+                    if (! $initially_malformed) {
+                        $this_name .= ($disallowed)
+                                       ? 'disallowed, '
+                                       : 'allowed, ';
+                    }
+                    $this_name .= "$eval_warn";
                     $this_name .= ", " . ((  $this_warning_flags
                                             & $this_utf8n_flag_to_warn)
                                           ? 'with flag for raising warnings'