6 use Test::More tests => 45;
9 use_ok( 'WebPAC::Test' );
10 use_ok( 'WebPAC::Input' );
13 my $module = 'WebPAC::Input::Excel';
14 diag "testing with $module";
16 our ($input,$db,$size);
20 ok($input = new WebPAC::Input(
27 $path = "$abs_path/data/$path";
28 ok(my $db = $input->open( path => $path ), "open $path");
29 ok($size = $input->size, "size $size");
34 open_xls('excel_95.xls');
36 foreach my $mfn ( 1 ... $size ) {
37 my $rec = $input->fetch;
38 if ($mfn <= 10 || $mfn == 20) {
39 ok($rec, "fetch $mfn");
41 ok(! $rec, "empty $mfn");
44 cmp_ok($input->pos, '==', $mfn, "pos $mfn");
46 diag "rec: ", dump($rec), "\n" if $debug;
49 open_xls('stara-signatura.xls');
51 foreach my $mfn ( 20 .. 23 ) {
52 diag dump( $input->fetch( $mfn ) ) if $debug;