File: 03ooinfo.t

package info (click to toggle)
libmime-charset-perl 1.006.2-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 200 kB
  • ctags: 40
  • sloc: perl: 627; makefile: 41
file content (20 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use Test;

BEGIN { plan tests => 4 }

use MIME::Charset qw(:info);

my $obj;
$obj = MIME::Charset->new("iso-8859-2");
ok($obj->body_encoding, "Q", $obj->body_encoding);
$obj = MIME::Charset->new("ANSI X3.4-1968");
ok($obj->canonical_charset, "US-ASCII", $obj->canonical_charset);
$obj = MIME::Charset->new("utf-8");
ok($obj->header_encoding, "S", $obj->header_encoding);
$obj = MIME::Charset->new("shift_jis");
if (MIME::Charset::USE_ENCODE) {
    ok($obj->output_charset, "ISO-2022-JP", $obj->output_charset);
} else {
    ok($obj->output_charset, "SHIFT_JIS", $obj->output_charset);
}