/[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 30 by dpavlin, Sun Jul 17 10:42:23 2005 UTC revision 31 by dpavlin, Sun Jul 24 15:03:11 2005 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  use Test::More tests => 8;  use Test::More tests => 10;
4  use Test::Exception;  use Test::Exception;
5  use Cwd qw/abs_path/;  use Cwd qw/abs_path/;
6  use blib;  use blib;
# Line 14  ok(my $abs_path = abs_path($0), "abs_pat Line 14  ok(my $abs_path = abs_path($0), "abs_pat
14  $abs_path =~ s#/[^/]*$#/#;  $abs_path =~ s#/[^/]*$#/#;
15  diag "abs_path: $abs_path";  diag "abs_path: $abs_path";
16    
17    throws_ok { new WebPAC::Normalize::XML( lookup_regex => 'foo' ) } qr/pair/, "lookup_regex without lookup";
18    throws_ok { new WebPAC::Normalize::XML( lookup => 'bar' ) } qr/pair/, "lookup without lookup_regex";
19    
20  ok(my $n = new WebPAC::Normalize::XML( debug => 0 ), "new");  ok(my $n = new WebPAC::Normalize::XML( debug => 0 ), "new");
21    
22  throws_ok { $n->open() } qr/tag/, "open without tag";  throws_ok { $n->open() } qr/tag/, "open without tag";
# Line 32  my $rec = { Line 35  my $rec = {
35    
36  ok(my @ds = $n->data_structure( $rec ), "data_structure");  ok(my @ds = $n->data_structure( $rec ), "data_structure");
37    
 use Data::Dumper;  
 diag Dumper(\@ds);  

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

  ViewVC Help
Powered by ViewVC 1.1.26