summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/ext/PerlIO-encoding/t/nolooping.t
blob: 5e262be7f4e79864b16afe37c2821bb79b175532 (plain) (blame)
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
27
28
29
#!perl -w

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

use Config;

use Test::More (ord("A") == 65 && $Config{useperlio})
               ? (tests => 1)
               : (skip_all => '(No PerlIO enabled;'
                            . ' or is 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