diff options
author | Karl Williamson <khw@cpan.org> | 2018-01-28 14:43:00 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-01-30 08:54:40 -0700 |
commit | 23038144c235075a2b8963ddcd94b9f94de1996f (patch) | |
tree | 58ed2b0baa708c495f2164de630322a03cc9d7b8 /ext/XS-APItest | |
parent | 37657a5b6c74c2e0dea5f3efa1407aaf51790d35 (diff) | |
download | perl-23038144c235075a2b8963ddcd94b9f94de1996f.tar.gz |
APItest/t/utf8_warn_base.pl: Improve diagnostics
Diffstat (limited to 'ext/XS-APItest')
-rw-r--r-- | ext/XS-APItest/t/utf8_warn_base.pl | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/ext/XS-APItest/t/utf8_warn_base.pl b/ext/XS-APItest/t/utf8_warn_base.pl index 037b3e2481..d18cbb5af0 100644 --- a/ext/XS-APItest/t/utf8_warn_base.pl +++ b/ext/XS-APItest/t/utf8_warn_base.pl @@ -1669,23 +1669,30 @@ foreach my $test (@tests) { } } - is($returned_flags, 0, - " Got no unexpected return flags") - or diag "The unexpected flags gotten were: " + if (! is($returned_flags, 0, + " Got no unexpected return flags")) + { + diag "The unexpected flags gotten were: " . (flags_to_text($returned_flags, \@utf8n_flags_to_text) # We strip off any prefixes from the flag # names =~ s/ \b [A-Z] _ //xgr); - is (scalar @scratch_expected_return_flags, 0, - " Got all expected return flags") - or diag "The expected flags not gotten were: " + diag "Call was: " . utf8n_display_call($eval_text); + } + + if (! is (scalar @scratch_expected_return_flags, 0, + " Got all expected return flags")) + { + diag "The expected flags not gotten were: " . (flags_to_text(eval join("|", @scratch_expected_return_flags), \@utf8n_flags_to_text) # We strip off any prefixes from the flag # names =~ s/ \b [A-Z] _ //xgr); + diag "Call was: " . utf8n_display_call($eval_text); + } if ($which_func) { my @returned_warnings; |