This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In utf8decode.t, use warning_is() for the should-not-warn cases.
authorNicholas Clark <nick@ccl4.org>
Sat, 12 Mar 2011 12:26:06 +0000 (12:26 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 12 Mar 2011 15:18:15 +0000 (15:18 +0000)
commitc03ceae63f8f7a143e71b8f14156e70222a3c47b
tree555ce73046bb9b053f498b27713407971e938be6
parente1a6746056fd4573691b7765b9fd94a7996d1320
In utf8decode.t, use warning_is() for the should-not-warn cases.

Move the localised $SIG{__WARN__} handler into the block for the should-warn
case, and avoid using $@ as the warnings accumulator. As an expected warning is
always provided, eliminate the code for dealing with an unspecified expected
warning. The re-ordering allows $id to be a lexical with the same scope as all
others derived from the test table lines.
t/op/utf8decode.t