This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest:t/utf8_warn_base.pl; Fix 'ok' tests
authorKarl Williamson <khw@cpan.org>
Fri, 2 Feb 2018 18:38:29 +0000 (11:38 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 7 Feb 2018 18:19:14 +0000 (11:19 -0700)
This was putting the condition for the ok in a string, which always
succeeds

ext/XS-APItest/t/utf8_warn_base.pl

index 6c3b04a..3f38fd5 100644 (file)
@@ -1616,7 +1616,7 @@ foreach my $test (@tests) {
                             . " = test_$func("
                             . "'$this_bytes', $this_length, $this_flags)";
                     eval "$eval_text";
-                    if (! ok ("$@ eq ''", "$this_name: eval succeeded"))
+                    if (! ok ($@ eq "", "$this_name: eval succeeded"))
                     {
                         diag "\$@='$@'; call was: "
                            . utf8n_display_call($eval_text);
@@ -1748,7 +1748,7 @@ foreach my $test (@tests) {
                                       . "$this_bytes', $this_length,"
                                       . " $this_flags)";
                         eval $eval_text;
-                        if (! ok ("$@ eq ''",
+                        if (! ok ($@ eq "",
                             "    And eval succeeded with CHECK_ONLY"))
                         {
                             diag "\$@='$@'; Call was: "
@@ -1806,7 +1806,7 @@ foreach my $test (@tests) {
                             . " test_uvchr_to_utf8_flags("
                             . "$allowed_uv, $this_flags)";
                     eval "$eval_text";
-                    if (! ok ("$@ eq ''", "$this_name: eval succeeded"))
+                    if (! ok ($@ eq "", "$this_name: eval succeeded"))
                     {
                         diag "\$@='$@'; call was: "
                            . uvchr_display_call($eval_text);