/[webpac2]/trunk/t/6-unit.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/6-unit.t

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

revision 33 by dpavlin, Sun Jul 24 15:35:46 2005 UTC revision 252 by dpavlin, Thu Dec 15 17:01:04 2005 UTC
# Line 12  use blib; Line 12  use blib;
12  BEGIN {  BEGIN {
13  use_ok( 'WebPAC::Lookup' );  use_ok( 'WebPAC::Lookup' );
14  use_ok( 'WebPAC::Input::ISIS' );  use_ok( 'WebPAC::Input::ISIS' );
15  use_ok( 'WebPAC::DB' );  use_ok( 'WebPAC::Store' );
16  use_ok( 'WebPAC::Normalize::XML' );  use_ok( 'WebPAC::Normalize::XML' );
17  use_ok( 'WebPAC::Output::TT' );  use_ok( 'WebPAC::Output::TT' );
18  }  }
# Line 38  ok(my $isis = new WebPAC::Input::ISIS( Line 38  ok(my $isis = new WebPAC::Input::ISIS(
38  ok(my $maxmfn = $isis->open(  ok(my $maxmfn = $isis->open(
39          filename => $isis_file,          filename => $isis_file,
40          code_page => '852',             # database encoding          code_page => '852',             # database encoding
41            lookup => $lookup,
42  ), "Input::ISIS->open");  ), "Input::ISIS->open");
43    
44  ok(my $path = tempdir( CLEANUP => 1 ), "path");  ok(my $path = tempdir( CLEANUP => 1 ), "path");
45    
46  ok(my $db = new WebPAC::DB(  ok(my $db = new WebPAC::Store(
47          path => $path,          path => $path,
48  ), "new DB");          database => '.',
49    ), "new Store");
50    
51  ok(my $n = new WebPAC::Normalize::XML(  ok(my $n = new WebPAC::Normalize::XML(
52  #       filter => { 'foo' => sub { shift } },  #       filter => { 'foo' => sub { shift } },
# Line 65  ok(my $out = new WebPAC::Output::TT( Line 67  ok(my $out = new WebPAC::Output::TT(
67    
68  while (my $row = $isis->fetch) {  while (my $row = $isis->fetch) {
69                    
70          ok(my @ds = $n->data_structure($row), "data_structure");          ok(my $ds = $n->data_structure($row), "data_structure");
71    
72  #       diag Dumper(\@ds);  #       diag Dumper($ds);
73    
74          ok(my $html = $out->apply(          ok(my $html = $out->apply(
75                  template => 'html.tt',                  template => 'html.tt',
76                  data => \@ds,                  data => $ds,
77          ), "apply");          ), "apply");
78    
79          $html =~ s#\s*[\n\r]+\s*##gs;          $html =~ s#\s*[\n\r]+\s*##gs;

Legend:
Removed from v.33  
changed lines
  Added in v.252

  ViewVC Help
Powered by ViewVC 1.1.26