/[webpac2]/trunk/t/2-input-excel.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/2-input-excel.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1094 by dpavlin, Thu Nov 1 00:16:48 2007 UTC revision 1095 by dpavlin, Fri Aug 1 23:41:47 2008 UTC
# Line 13  use_ok( 'WebPAC::Input' ); Line 13  use_ok( 'WebPAC::Input' );
13  my $module = 'WebPAC::Input::Excel';  my $module = 'WebPAC::Input::Excel';
14  diag "testing with $module";  diag "testing with $module";
15    
16  ok(my $input = new WebPAC::Input(  our ($input,$db,$size);
17          module => $module,  
18          no_progress_bar => 1,  sub open_xls {
19          %LOG,  
20  ), "new");          ok($input = new WebPAC::Input(
21                    module => $module,
22  ok(my $db = $input->open(                  no_progress_bar => 1,
23          path => "$abs_path/data/excel_95.xls"                  %LOG,
24  ), "open");          ), "new $module");
25  ok(my $size = $input->size, "size");  
26            my $path = shift;
27            $path = "$abs_path/data/$path";
28            ok(my $db = $input->open( path => $path ), "open $path");
29            ok($size = $input->size, "size $size");
30            return $db;
31    }
32    
33    
34    open_xls('excel_95.xls');
35    
36  foreach my $mfn ( 1 ... $size ) {  foreach my $mfn ( 1 ... $size ) {
37          my $rec = $input->fetch;          my $rec = $input->fetch;
# Line 37  foreach my $mfn ( 1 ... $size ) { Line 46  foreach my $mfn ( 1 ... $size ) {
46          diag "rec: ", dump($rec), "\n" if $debug;          diag "rec: ", dump($rec), "\n" if $debug;
47  }  }
48    
49    open_xls('stara-signatura.xls');
50    
51    foreach my $mfn ( 20 .. 23 ) {
52            diag dump( $input->fetch( $mfn ) ) if $debug;
53    }

Legend:
Removed from v.1094  
changed lines
  Added in v.1095

  ViewVC Help
Powered by ViewVC 1.1.26