~ubuntu-branches/ubuntu/precise/libxml-libxml-perl/precise-security

« back to all changes in this revision

Viewing changes to t/03parsefile.t

  • Committer: Bazaar Package Importer
  • Author(s): Ardo van Rangelrooij
  • Date: 2002-02-16 22:33:54 UTC
  • Revision ID: james.westby@ubuntu.com-20020216223354-8zq3wlngmkrdexns
Tags: upstream-1.31
ImportĀ upstreamĀ versionĀ 1.31

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use Test;
 
2
BEGIN { plan tests => 5 };
 
3
use XML::LibXML;
 
4
ok(1);
 
5
 
 
6
my $parser = XML::LibXML->new();
 
7
ok($parser);
 
8
 
 
9
my $doc = $parser->parse_file("example/dromeds.xml");
 
10
 
 
11
ok($doc);
 
12
 
 
13
eval {
 
14
    $parser->parse_file("example/bad.xml");
 
15
};
 
16
ok($@);
 
17
 
 
18
eval {
 
19
    $parser->parse_file("does_not_exist.xml");
 
20
};
 
21
ok($@);
 
22
 
 
23
# warn "doc is: ", $doc->toString, "\n";