summaryrefslogtreecommitdiff
path: root/ext/PerlIO-encoding/t/nolooping.t
blob: b86fcf074b9aba7f726e6cd64209dbae876dfebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!perl -w

BEGIN {
    use Config;
    if ($Config{extensions} !~ /\bEncode\b/) {
	print "1..0 # Skip: no Encode\n";
	exit 0;
    }
}

use Test::More ord("A") == 65
               ? (tests => 1)
               : (skip_all => 'EBCDIC platform which doesnt have'
                            . ' "use encoding" used by open ":locale")');
BEGIN {
    $SIG{__WARN__} = sub { $warn .= $_[0] };
}

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