Skip to content

Commit

Permalink
Skip this test if "use open" fails due to an unknown encoding
Browse files Browse the repository at this point in the history
p4raw-id: //depot/perl@30233
  • Loading branch information
rgs committed Feb 12, 2007
1 parent 3ba77b8 commit 771ed9f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ext/PerlIO/encoding/t/nolooping.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

use Test::More tests => 1;

BEGIN {
$SIG{__WARN__} = sub { $warn .= $_[0] };
}

# bug #41442
use PerlIO::encoding;
use open ':locale';
if (-e '/dev/null') { open STDERR, '>', '/dev/null' }
warn "# \x{201e}\n"; # „
if ($warn !~ /Cannot find encoding/) {
if (-e '/dev/null') { open STDERR, '>', '/dev/null' }
warn "# \x{201e}\n"; # „
}
ok(1); # we got that far

0 comments on commit 771ed9f

Please sign in to comment.