/[webpac2]/trunk/t/2-input-isi.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/2-input-isi.t

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

revision 1078 by dpavlin, Thu Nov 1 00:16:48 2007 UTC revision 1079 by dpavlin, Wed Nov 28 22:52:59 2007 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use blib;  use blib;
5    
6  use Test::More tests => 9;  use Test::More tests => 12;
7    
8  BEGIN {  BEGIN {
9  use_ok( 'WebPAC::Test' );  use_ok( 'WebPAC::Test' );
# Line 23  ok(my $db = $input->open( Line 23  ok(my $db = $input->open(
23          path => "$abs_path/data/recs.txt"          path => "$abs_path/data/recs.txt"
24  ), "open");  ), "open");
25  ok(my $size = $input->size, "size");  ok(my $size = $input->size, "size");
26    cmp_ok( $size, '==', 2, 'size ok' );
27    
28  foreach my $mfn ( 1 ... $size ) {  foreach my $mfn ( 1 ... $size ) {
29          my $rec = $input->fetch;          my $rec = $input->fetch;
30          if ($mfn <= 10 || $mfn == 20) {          if ($mfn <= 10 || $mfn == 20) {
31                  ok($rec, "fetch $mfn");                  ok($rec, "fetch $mfn");
32                    cmp_ok($rec->{'000'}->[0], '==', $mfn, 'has mfn');
33          } else {          } else {
34                  ok(! $rec, "empty $mfn");                  ok(! $rec, "empty $mfn");
35          }          }

Legend:
Removed from v.1078  
changed lines
  Added in v.1079

  ViewVC Help
Powered by ViewVC 1.1.26