projects
/
webpac2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r1904@llin: dpavlin | 2009-05-30 16:21:56 +0200
[webpac2]
/
t
/
2-input-isi.t
diff --git
a/t/2-input-isi.t
b/t/2-input-isi.t
index
5156143
..
4dc3aca
100755
(executable)
--- a/
t/2-input-isi.t
+++ b/
t/2-input-isi.t
@@
-3,7
+3,7
@@
use strict;
use blib;
use strict;
use blib;
-use Test::More tests =>
9
;
+use Test::More tests =>
12
;
BEGIN {
use_ok( 'WebPAC::Test' );
BEGIN {
use_ok( 'WebPAC::Test' );
@@
-20,17
+20,16
@@
ok(my $input = new WebPAC::Input(
), "new");
ok(my $db = $input->open(
), "new");
ok(my $db = $input->open(
- path => "$abs_path/data/recs.txt"
+# path => "$abs_path/data/recs.txt"
+ path => "$abs_path/data/isi.txt"
), "open");
ok(my $size = $input->size, "size");
), "open");
ok(my $size = $input->size, "size");
+cmp_ok( $size, '==', 3, 'size ok' );
foreach my $mfn ( 1 ... $size ) {
my $rec = $input->fetch;
foreach my $mfn ( 1 ... $size ) {
my $rec = $input->fetch;
- if ($mfn <= 10 || $mfn == 20) {
- ok($rec, "fetch $mfn");
- } else {
- ok(! $rec, "empty $mfn");
- }
+
+ ok( $rec->{TI}, 'TI' );
cmp_ok($input->pos, '==', $mfn, "pos $mfn");
cmp_ok($input->pos, '==', $mfn, "pos $mfn");