This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PerlIO-encoding/t/nolooping.t: Skip on EBCDIC platform
[perl5.git] / ext / PerlIO-encoding / t / nolooping.t
1 #!perl -w
2
3 BEGIN {
4     use Config;
5     if ($Config{extensions} !~ /\bEncode\b/) {
6         print "1..0 # Skip: no Encode\n";
7         exit 0;
8     }
9 }
10
11 use Config;
12
13 use Test::More (ord("A") == 65 && $Config{useperlio})
14                ? (tests => 1)
15                : (skip_all => '(No PerlIO enabled;'
16                             . ' or is EBCDIC platform which doesnt have'
17                             . ' "use encoding" used by open ":locale")');
18 BEGIN {
19     $SIG{__WARN__} = sub { $warn .= $_[0] };
20 }
21
22 # bug #41442
23 use PerlIO::encoding;
24 use open ':locale';
25 if ($warn !~ /Cannot find encoding/) {
26     if (-e '/dev/null') { open STDERR, '>', '/dev/null' }
27     warn "# \x{201e}\n"; # „
28 }
29 ok(1); # we got that far