6 use Test::More tests => 75;
9 use_ok( 'WebPAC::Test' );
10 use_ok( 'WebPAC::Input' );
13 my $module = 'WebPAC::Input::Excel';
14 diag "testing with $module";
16 ok(my $input = new WebPAC::Input(
25 my $path = shift || die "no path?";
26 $path = "$abs_path/data/$path";
27 ok(my $db = $input->open( path => $path ), "open $path");
28 ok($size = $input->size, "size $size");
32 open_xls('excel_95.xls');
34 foreach my $mfn ( 1 ... $size ) {
35 my $rec = $input->fetch;
36 if ($mfn <= 10 || $mfn == 20) {
37 ok($rec, "fetch $mfn");
39 ok(! $rec, "empty $mfn");
42 cmp_ok($input->pos, '==', $mfn, "pos $mfn");
44 diag "rec: ", dump($rec), "\n" if $debug;
47 open_xls('stara-signatura.xls');
49 ok( $input->seek( $_ ), "seek $_");
50 ok( my $rec = $input->fetch, "fetch $_" );
51 diag dump( $rec ) if $debug;