/[webpac2]/trunk/t/3-normalize-xml.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/3-normalize-xml.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by dpavlin, Sun Jul 24 15:03:11 2005 UTC revision 62 by dpavlin, Tue Nov 15 14:31:12 2005 UTC
# Line 5  use Test::Exception; Line 5  use Test::Exception;
5  use Cwd qw/abs_path/;  use Cwd qw/abs_path/;
6  use blib;  use blib;
7  use strict;  use strict;
8    use Data::Dumper;
9    
10  BEGIN {  BEGIN {
11  use_ok( 'WebPAC::Normalize::XML' );  use_ok( 'WebPAC::Normalize::XML' );
# Line 21  ok(my $n = new WebPAC::Normalize::XML( d Line 22  ok(my $n = new WebPAC::Normalize::XML( d
22    
23  throws_ok { $n->open() } qr/tag/, "open without tag";  throws_ok { $n->open() } qr/tag/, "open without tag";
24  throws_ok { $n->open( tag => 'isis' ) } qr/xml_file/, "open without xml_file";  throws_ok { $n->open( tag => 'isis' ) } qr/xml_file/, "open without xml_file";
25  throws_ok { $n->open( tag => 'isis', xml_file => 'foo' ) } qr/file.*doesn't exist/, "open with invalid xml_file";  throws_ok { $n->open( tag => 'isis', xml_file => '/foo/bar/baz' ) } qr/file.*doesn't exist/, "open with invalid xml_file";
26  ok( $n->open(  ok( $n->open(
27          tag => 'isis',          tag => 'isis',
28          xml_file => "$abs_path../conf/normalize/isis.xml",          xml_file => "$abs_path../conf/normalize/isis.xml",
# Line 35  my $rec = { Line 36  my $rec = {
36    
37  ok(my @ds = $n->data_structure( $rec ), "data_structure");  ok(my @ds = $n->data_structure( $rec ), "data_structure");
38    
39    #diag Dumper(@ds);

Legend:
Removed from v.31  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.26