diff options
Diffstat (limited to 'lib/encoding/warnings/t/2-fatal.t')
-rw-r--r-- | lib/encoding/warnings/t/2-fatal.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/encoding/warnings/t/2-fatal.t b/lib/encoding/warnings/t/2-fatal.t new file mode 100644 index 0000000000..1047169a2f --- /dev/null +++ b/lib/encoding/warnings/t/2-fatal.t @@ -0,0 +1,27 @@ +#!/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 $ + +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); |