/[webpac2]/trunk/t/5-output-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

Annotation of /trunk/t/5-output-excel.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1068 - (hide annotations)
Tue Nov 27 23:45:28 2007 UTC (16 years, 5 months ago) by dpavlin
File MIME type: application/x-troff
File size: 678 byte(s)
 r1670@llin:  dpavlin | 2007-11-28 00:13:29 +0100
 - WebPAC::Output::Excel

1 dpavlin 1068 #!/usr/bin/perl -w
2    
3     use strict;
4     use blib;
5    
6     use Test::More tests => 14;
7    
8     BEGIN {
9     use_ok( 'WebPAC::Test' );
10     use_ok( 'WebPAC::Output::Excel' );
11     }
12    
13     my $path = "$abs_path/out/test.xls";
14    
15     ok(my $out = new WebPAC::Output::Excel({ path => $path, %LOG }), "new");
16    
17     ok( $out->init, 'init' );
18    
19     throws_ok { $out->add( ) } qr/need id/, 'add without params';
20     throws_ok { $out->add( 42 ) } qr/need ds/, 'add without ds';
21    
22     foreach my $line ( 1 .. 5 ) {
23     my $ds;
24     foreach my $col ( 'A' .. 'Z' ) {
25     $ds->{ $col } = { csv => $line . $col };
26     }
27     ok( $out->add( $line, $ds ), "add $line" );
28     }
29    
30     ok( $out->finish );
31    
32     ok( -e $out->path, "created $path" );
33    
34     cmp_ok( $out->path, 'eq', $path, 'path' );
35    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26