File: 14encoding.t

package info (click to toggle)
libxml-sax-perl 0.16%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 556 kB
  • ctags: 175
  • sloc: perl: 2,417; xml: 121; sh: 79; makefile: 52
file content (35 lines) | stat: -rw-r--r-- 688 bytes parent folder | download | duplicates (3)
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
use Test;
BEGIN { $tests = 0;
    if ($] >= 5.007002) { $tests = 7 }
    plan tests => $tests;
}
if ($tests) {
use XML::SAX::PurePerl;
use XML::SAX::PurePerl::DebugHandler;

my $handler = XML::SAX::PurePerl::DebugHandler->new();
ok($handler);

my $parser = XML::SAX::PurePerl->new(Handler => $handler);
ok($parser);

# warn("utf-16\n");
$parser->parse_uri("testfiles/utf-16.xml");
ok(1);

# warn("utf-16le\n");
$parser->parse_uri("testfiles/utf-16le.xml");
ok(1);

# warn("koi8_r\n");
$parser->parse_uri("testfiles/koi8_r.xml");
ok(1);

# warn("8859-1\n");
$parser->parse_uri("testfiles/iso8859_1.xml");
ok(1);

# warn("8859-2\n");
$parser->parse_uri("testfiles/iso8859_2.xml");
ok(1);
}