blob: d2928cd1f1eac4698c47a74a04cb210e280a5362 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/usr/bin/perl
# $File: /member/local/autrijus/encoding-warnings/t/2-fatal.t $ $Author: autrijus $
# $Revision: #4 $ $Change: 1626 $ $DateTime: 2004-03-14T16:53:19.351256Z $
BEGIN {
if ("$]" >= 5.025) {
print "1..0 # Skip: encoding::warnings not supported on perl 5.26\n";
exit 0;
}
if (ord("A") != 65) {
print "1..0 # Skip: Encode not working on EBCDIC\n";
exit 0;
}
unless (eval { require Encode } ) {
print "1..0 # Skip: no Encode\n";
exit 0;
}
}
use Test;
BEGIN { plan tests => 2 }
use strict;
use encoding::warnings 'FATAL';
ok(encoding::warnings->VERSION);
if ($] < 5.008) {
ok(1);
exit;
}
my ($a, $b, $c, $ok);
$SIG{__DIE__} = sub {
if ($_[0] =~ /upgraded/) { ok(1); exit }
};
utf8::encode($a = chr(20000));
$b = chr(20000);
$c = $a . $b;
ok($ok);
|