3 use Test::More tests => 45;
9 use Data::Dump qw/dump/;
14 use_ok( 'WebPAC::Input' );
17 ok(my $abs_path = abs_path($0), "abs_path");
18 $abs_path =~ s#/[^/]*$#/#;
20 my $module = 'WebPAC::Input::Excel';
21 diag "testing with $module";
23 ok(my $input = new WebPAC::Input(
30 ok(my $db = $input->open(
31 path => "$abs_path/data/excel_95.xls"
33 ok(my $size = $input->size, "size");
35 foreach my $mfn ( 1 ... $size ) {
36 my $rec = $input->fetch;
37 if ($mfn <= 10 || $mfn == 20) {
38 ok($rec, "fetch $mfn");
40 ok(! $rec, "empty $mfn");
43 cmp_ok($input->pos, '==', $mfn, "pos $mfn");
45 diag "rec: ", dump($rec), "\n";