summaryrefslogtreecommitdiff
path: root/t/io/utf8.t
diff options
context:
space:
mode:
Diffstat (limited to 't/io/utf8.t')
-rwxr-xr-xt/io/utf8.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/io/utf8.t b/t/io/utf8.t
index 52b641d2f1..ac5cde7a6e 100755
--- a/t/io/utf8.t
+++ b/t/io/utf8.t
@@ -135,8 +135,9 @@ print "ok 21\n";
# Now let's make it suffer.
open F, ">", "a" or die $!;
-eval { print F $a; };
-print "not " unless $@ and $@ =~ /Wide character in print/i;
+my $w;
+eval {local $SIG{__WARN__} = sub { $w = $_[0] }; print F $a; };
+print "not " if ($@ || $w !~ /Wide character in print/i);
print "ok 22\n";
}