6 use Test::More tests => 49;
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(
27 $args->{path} = "$abs_path/data/" . $args->{path} || die "no path?";
28 ok(my $db = $input->open( %$args ), "open " . dump( $args ));
29 ok($size = $input->size, "size $size");
33 open_xls({ path => 'excel_95.xls' });
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" if $debug;
48 open_xls({ path => 'stara-signatura.xls', input_encoding => 'utf-16' });
49 ok( $input->seek( 790 ), 'seek 790');
50 ok( my $rec = $input->fetch, 'fetch' );