X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F10excel.t;h=5c2e1488e7a4eb3f19e7c27f343f398b318aef33;hb=75abfa5b960cd838a24e879a4c94013d4b6d3138;hp=0414d943c06d1db2f9a38cac36a13c8d52300133;hpb=2d691ec135298f8a4523656dc0516dcb7af3e8cd;p=dbsrgits%2FSQL-Translator.git diff --git a/t/10excel.t b/t/10excel.t index 0414d94..5c2e148 100644 --- a/t/10excel.t +++ b/t/10excel.t @@ -10,7 +10,7 @@ BEGIN { maybe_plan(31, 'SQL::Translator::Parser::Excel'); SQL::Translator::Parser::Excel->import('parse'); } - + my $tr = SQL::Translator->new(parser => "Excel"); my $t = $tr->translate(filename => "t/data/Excel/t.xls"); my $schema = $tr->schema; @@ -43,10 +43,16 @@ is( $f3->size, 1, 'Size is "1"' ); is( $f3->is_primary_key, 0, 'Field is not PK' ); my $f4 = shift @fields; -is( $f4->name, 'math', 'Fourth field name is "math"' ); -is( lc $f4->data_type, 'float', 'Data type is "float"' ); -is( $f4->size, '3,1', 'Size is "3,1"' ); -is( $f4->is_primary_key, 0, 'Field is not PK' ); +TODO: { + eval { require Spreadsheet::ParseExcel }; + todo_skip "Bug in Spreadsheet::ParseExcel, http://rt.cpan.org/Public/Bug/Display.html?id=39892", 4 + if ( $Spreadsheet::ParseExcel::VERSION > 0.32 and $Spreadsheet::ParseExcel::VERSION < 0.41 ); + + is( $f4->name, 'math', 'Fourth field name is "math"' ); + is( lc $f4->data_type, 'float', 'Data type is "float"' ); + is( $f4->size, '3,1', 'Size is "3,1"' ); + is( $f4->is_primary_key, 0, 'Field is not PK' ); +} my $f5 = shift @fields; is( $f5->name, 'bitmap', 'Fifth field name is "bitmap"' ); @@ -61,7 +67,7 @@ is( $f6->size, 10, 'Size is "10"' ); is( $f6->is_primary_key, 0, 'Field is not PK' ); my $f7 = shift @fields; -is( $f7->name, 'silly_field_with_random_characters', +is( $f7->name, 'silly_field_with_random_characters', 'Seventh field name is "silly_field_with_random_characters"' ); is( lc $f7->data_type, 'char', 'Data type is "CHAR"' ); is( $f7->size, 11, 'Size is "11"' );