/[webpac2]/trunk/t/2-input-isis.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-isis.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 285 by dpavlin, Sun Dec 18 21:06:39 2005 UTC
# Line 16  $abs_path =~ s#/[^/]*$#/#; Line 16  $abs_path =~ s#/[^/]*$#/#;
16  ok(my $isis = new WebPAC::Input::ISIS( no_log => 1 ), "new");  ok(my $isis = new WebPAC::Input::ISIS( no_log => 1 ), "new");
17  ok(my $isis_lm = new WebPAC::Input::ISIS( low_mem => 1, no_log => 1 ), "new");  ok(my $isis_lm = new WebPAC::Input::ISIS( low_mem => 1, no_log => 1 ), "new");
18    
19  throws_ok { $isis->open( ) } qr/filename/, "need filename";  throws_ok { $isis->open( ) } qr/path/, "need path";
20    
21  throws_ok { $isis->open( filename => '/dev/null', ) } qr/can't find database/ , "open";  throws_ok { $isis->open( path => '/dev/null', ) } qr/can't find database/ , "open";
22    
23  ok($isis->open( filename => "$abs_path/winisis/BIBL" ), "open");  ok($isis->open( path => "$abs_path/winisis/BIBL" ), "open");
24  ok($isis_lm->open( filename => "$abs_path/winisis/BIBL", low_mem => 1 ), "open");  ok($isis_lm->open( path => "$abs_path/winisis/BIBL", low_mem => 1 ), "open");
25    
26  cmp_ok($isis->pos, '==', -1, "mfn");  cmp_ok($isis->pos, '==', -1, "mfn");
27    
# Line 51  sub test_start_limit($$$) { Line 51  sub test_start_limit($$$) {
51    
52          diag "start_mfn: $s, limit_mfn: $l, expected: $e";          diag "start_mfn: $s, limit_mfn: $l, expected: $e";
53    
54          ok($s = $isis->open( filename => "$abs_path/winisis/BIBL", start_mfn => $s, limit_mfn => $l, debug => 1 ), "open");          ok($s = $isis->open( path => "$abs_path/winisis/BIBL", start_mfn => $s, limit_mfn => $l, debug => 1 ), "open");
55          cmp_ok($s, '==', $size, "db size from open");          cmp_ok($s, '==', $size, "db size from open");
56          cmp_ok($isis->size, '==', $e, "size");          cmp_ok($isis->size, '==', $e, "size");
57  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.26