This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #90160] U* gives ‘U0 mode on an empty string’
[perl5.git] / t / uni / chr.t
1 #!./perl -w
2
3 BEGIN {
4     require './test.pl';
5     skip_all_without_dynamic_extension('Encode');
6     skip_all("EBCDIC") if $::IS_EBCDIC;
7     skip_all_without_perlio();
8 }
9
10 use strict;
11 plan (tests => 6);
12 use encoding 'johab';
13
14 ok(chr(0x7f) eq "\x7f");
15 ok(chr(0x80) eq "\x80");
16 ok(chr(0xff) eq "\xff");
17
18 for my $i (127, 128, 255) {
19     ok(chr($i) eq pack('C', $i));
20 }
21
22 __END__