This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: Remove unnecessary cBOOLs
[perl5.git] / t / uni / chr.t
CommitLineData
e4206093 1#!./perl -w
4c5ed6e2
TS
2
3BEGIN {
4c5ed6e2
TS
4 require Config; import Config;
5 if ($Config{'extensions'} !~ /\bEncode\b/) {
6 print "1..0 # Skip: Encode was not built\n";
7 exit 0;
8 }
9 if (ord("A") == 193) {
10 print "1..0 # Skip: EBCDIC\n";
11 exit 0;
12 }
13 unless (PerlIO::Layer->find('perlio')){
14 print "1..0 # Skip: PerlIO required\n";
15 exit 0;
16 }
17 if ($ENV{PERL_CORE_MINITEST}) {
18 print "1..0 # Skip: no dynamic loading on miniperl, no Encode\n";
19 exit 0;
20 }
21 $| = 1;
e4206093
NC
22
23 require './test.pl';
4c5ed6e2
TS
24}
25
26use strict;
e4206093 27plan (tests => 6);
4c5ed6e2
TS
28use encoding 'johab';
29
30ok(chr(0x7f) eq "\x7f");
31ok(chr(0x80) eq "\x80");
32ok(chr(0xff) eq "\xff");
33
34for my $i (127, 128, 255) {
35 ok(chr($i) eq pack('C', $i));
36}
37
38__END__