diff options
author | Father Chrysostomos <sprout@cpan.org> | 2016-07-10 18:53:05 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2016-07-13 01:12:48 -0700 |
commit | c5a6fcde9e935abf29a128e33f134e0272a6f740 (patch) | |
tree | b825544f5f2217a12f7925c38f306b9bcaab47a3 /t/uni | |
parent | 370579b70296bb5a423996c84702c6fc4a473f4a (diff) | |
download | perl-c5a6fcde9e935abf29a128e33f134e0272a6f740.tar.gz |
Remove t/uni/chr.t
Without ‘use encoding’, tests like
ok(chr(0x7f) eq "\x7f");
have little to do with perl’s Unicode support, and they duplicate
tests in t/op/chr.t.
It is not necessary to convert these to use chars > 0xff, to test chr
with Unicode, as t/op/chr.t already does that, too.
Move the warning test to t/lib/warnings/pp. That is the only thing
tested here that is not tested elsewhere.
Diffstat (limited to 't/uni')
-rw-r--r-- | t/uni/chr.t | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/t/uni/chr.t b/t/uni/chr.t deleted file mode 100644 index 3392a09fd9..0000000000 --- a/t/uni/chr.t +++ /dev/null @@ -1,31 +0,0 @@ -#!./perl -w - -BEGIN { - chdir 't' if -d 't'; - require './test.pl'; - skip_all_without_dynamic_extension('Encode'); - skip_all("no encoding pragma in EBCDIC") if $::IS_EBCDIC; - skip_all_without_perlio(); -} - -use strict; -plan (tests => 8); - -ok(chr(0x7f) eq "\x7f"); -ok(chr(0x80) eq "\x80"); -ok(chr(0xff) eq "\xff"); - -for my $i (127, 128, 255) { - ok(chr($i) eq pack('C', $i)); -} - -# [perl #83048] -{ - my $w; - local $SIG{__WARN__} = sub { $w .= $_[0] }; - my $chr = chr(-1); - is($chr, "\x{fffd}", "invalid values become REPLACEMENT CHARACTER"); - like($w, qr/^Invalid negative number \(-1\) in chr at /, "with a warning"); -} - -__END__ |