r37359 - in /branches/upstream/libspreadsheet-read-perl/current: ./ examples/ t/
ryan52-guest at users.alioth.debian.org
ryan52-guest at users.alioth.debian.org
Wed Jun 3 15:32:05 UTC 2009
Author: ryan52-guest
Date: Wed Jun 3 15:32:01 2009
New Revision: 37359
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=37359
Log:
[svn-upgrade] Integrating new upstream version, libspreadsheet-read-perl (0.35)
Modified:
branches/upstream/libspreadsheet-read-perl/current/Changes
branches/upstream/libspreadsheet-read-perl/current/META.yml
branches/upstream/libspreadsheet-read-perl/current/Makefile.PL
branches/upstream/libspreadsheet-read-perl/current/Read.pm
branches/upstream/libspreadsheet-read-perl/current/examples/xlscat
branches/upstream/libspreadsheet-read-perl/current/t/10_basics.t
branches/upstream/libspreadsheet-read-perl/current/t/11_call.t
branches/upstream/libspreadsheet-read-perl/current/t/20_csv.t
branches/upstream/libspreadsheet-read-perl/current/t/21_csv.t
branches/upstream/libspreadsheet-read-perl/current/t/22_csv.t
branches/upstream/libspreadsheet-read-perl/current/t/30_xls.t
branches/upstream/libspreadsheet-read-perl/current/t/31_clr.t
branches/upstream/libspreadsheet-read-perl/current/t/32_fmt.t
branches/upstream/libspreadsheet-read-perl/current/t/33_misc.t
branches/upstream/libspreadsheet-read-perl/current/t/34_dates.t
branches/upstream/libspreadsheet-read-perl/current/t/35_perc.t
branches/upstream/libspreadsheet-read-perl/current/t/40_sxc.t
branches/upstream/libspreadsheet-read-perl/current/t/45_ods.t
branches/upstream/libspreadsheet-read-perl/current/t/46_clr.t
branches/upstream/libspreadsheet-read-perl/current/t/50_sc.t
branches/upstream/libspreadsheet-read-perl/current/t/60_xls.t
branches/upstream/libspreadsheet-read-perl/current/t/61_clr.t
branches/upstream/libspreadsheet-read-perl/current/t/62_fmt.t
branches/upstream/libspreadsheet-read-perl/current/t/63_misc.t
branches/upstream/libspreadsheet-read-perl/current/t/64_dates.t
branches/upstream/libspreadsheet-read-perl/current/t/65_perc.t
Modified: branches/upstream/libspreadsheet-read-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/Changes?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/Changes (original)
+++ branches/upstream/libspreadsheet-read-perl/current/Changes Wed Jun 3 15:32:01 2009
@@ -1,6 +1,17 @@
Revision history for Spreadsheet::Read
-0.34 Fri 23 Jan 2009
+0.35 Wed 03 Jun 2009
+
+ - Add Test::NoWarnings, which is not run in AUTOMATED_TESTING
+ - Switched to Test::More using tests_done ()
+ - Text::CSV_XS requires 0.43 or up, as we use ->eof ()
+ still prefer a really new release, like 0.65, which
+ is Test::NoWarnings safe
+ - Spreadsheet::XLSX 0.10 still does not support attributes
+ - Added -n to xlscat
+ - XLSX tests skip on feature, not on version
+
+0.34 Tue 27 Jan 2009
- Spreadsheet::XLSX 0.09 still does not support attributes
still think it is better to follow closely. 0.09 is much
Modified: branches/upstream/libspreadsheet-read-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/META.yml?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/META.yml (original)
+++ branches/upstream/libspreadsheet-read-perl/current/META.yml Wed Jun 3 15:32:01 2009
@@ -1,6 +1,6 @@
--- #YAML:1.1
name: Read
-version: 0.34
+version: 0.35
abstract: Meta-Wrapper for reading spreadsheet data
license: perl
author:
@@ -10,7 +10,7 @@
provides:
Spreadsheet::Read:
file: Read.pm
- version: 0.34
+ version: 0.35
requires:
perl: 5.006
Exporter: 0
@@ -20,12 +20,16 @@
perl: 5.008005
File::Temp: 0.14
IO::Scalar: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
build_requires:
perl: 5.006
Test::Harness: 0
- Test::More: 0
+ Test::More: 0.88
+ Test::NoWarnings: 0
resources:
license: http://dev.perl.org/licenses/
+ repository: http://repo.or.cz/w/Spreadsheet-Read.git
meta-spec:
version: 1.4
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -33,11 +37,11 @@
- opt_csv:
description: Provides parsing of CSV streams
requires:
- Text::CSV_XS: 0.23
+ Text::CSV_XS: 0.43
recommends:
- Text::CSV: 1.10
- Text::CSV_PP: 1.10
- Text::CSV_XS: 0.60
+ Text::CSV: 1.12
+ Text::CSV_PP: 1.20
+ Text::CSV_XS: 0.65
- opt_excel:
description: Provides parsing of Microsoft Excel files
requires:
@@ -48,7 +52,7 @@
- opt_excelx:
description: Provides parsing of Microsoft Excel 2007 files
requires:
- Spreadsheet::XLSX: 0.09
+ Spreadsheet::XLSX: 0.1
Spreadsheet::XLSX::Fmt2007: 0
- opt_oo:
description: Provides parsing of OpenOffice spreadsheets
Modified: branches/upstream/libspreadsheet-read-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/Makefile.PL?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/Makefile.PL (original)
+++ branches/upstream/libspreadsheet-read-perl/current/Makefile.PL Wed Jun 3 15:32:01 2009
@@ -39,7 +39,8 @@
# "Spreadsheet::Perl" => 0.00, # Not yet
# For testing
- "Test::More" => 0.00,
+ "Test::More" => 0.88,
+ "Test::NoWarnings" => 0.00,
# for ss2tk
# "Tk" => 804.027,
Modified: branches/upstream/libspreadsheet-read-perl/current/Read.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/Read.pm?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/Read.pm (original)
+++ branches/upstream/libspreadsheet-read-perl/current/Read.pm Wed Jun 3 15:32:01 2009
@@ -22,7 +22,7 @@
use strict;
use warnings;
-our $VERSION = "0.34";
+our $VERSION = "0.35";
sub Version { $VERSION }
use Carp;
@@ -112,7 +112,7 @@
# cell2cr ("D18") => (4, 18)
sub cell2cr
{
- my ($cc, $r) = ((uc $_[0]) =~ m/^([A-Z]+)([0-9]+)$/) or return (0, 0);
+ my ($cc, $r) = (uc ($_[0]||"") =~ m/^([A-Z]+)([0-9]+)$/) or return (0, 0);
my $c = 0;
while ($cc =~ s/^([A-Z])//) {
$c = 26 * $c + 1 + ord ($1) - ord ("A");
Modified: branches/upstream/libspreadsheet-read-perl/current/examples/xlscat
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/examples/xlscat?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/examples/xlscat (original)
+++ branches/upstream/libspreadsheet-read-perl/current/examples/xlscat Wed Jun 3 15:32:01 2009
@@ -1,20 +1,20 @@
#!/pro/bin/perl
# xls2cat: show XLS/SXC file as Text
-# (m)'08 [10-10-2008] Copyright H.M.Brand 2005-2009
+# (m)'09 [13-05-2009] Copyright H.M.Brand 2005-2009
use strict;
use warnings;
-our $VERSION = "1.8";
+our $VERSION = "1.9";
sub usage
{
my $err = shift and select STDERR;
print
- "usage: xlscat [-s <sep>] [-L] [-u] [ Selection ] file.xls\n",
- " [-c | -m] [-u] [ Selection ] file.xls\n",
- " -i [ -S sheets ] file.xls\n",
+ "usage: xlscat [-s <sep>] [-L] [-n] [-A] [-u] [ Selection ] file.xls\n",
+ " [-c | -m] [-u] [ Selection ] file.xls\n",
+ " -i [ -S sheets ] file.xls\n",
" Generic options:\n",
" -v[#] Set verbose level (xlscat)\n",
" -d[#] Set debug level (Spreadsheet::Read)\n",
@@ -32,6 +32,7 @@
" Output Text (default):\n",
" -s <sep> Use separator <sep>. Default '|', \\n allowed\n",
" -L Line up the columns\n",
+ " -n Number lines (prefix with column number)\n",
" -A Show field attributes in ANSI escapes\n",
" Output Index only:\n",
" -i Show sheet names and size only\n",
@@ -58,6 +59,7 @@
my $opt_F = ""; # Fields to print
my $opt_i = 0; # Index
my $opt_L = 0; # Auto-size/align columns
+my $opt_n = 0; # Prefix lines with column number
my $opt_u = 0; # Show unformatted values
my $opt_v = 0; # Verbosity for xlscat
my $opt_d = 0; # Debug level for Spreadsheet::Read
@@ -89,6 +91,7 @@
"C|columns=s" => \$opt_C,
"F|fields=s" => \$opt_F,
"L|fit|align" => \$opt_L,
+ "n|number" => \$opt_n,
"A|ansi" => \$opt_A,
"u|unformatted" => \$opt_u,
"v|verbose:1" => \$opt_v,
@@ -100,9 +103,6 @@
"b|encoding-in=s" => \$enc_i,
"a|encoding-out=s" => \$enc_o,
) or usage 1, "GetOpt: $@";
-
-#binmode STDOUT;
-binmode STDERR, ":utf8";
$opt_i && $opt_L and usage 1, "Options i and L are mutually exclusive";
$opt_i && $opt_s and usage 1, "Options i and s are mutually exclusive";
@@ -128,7 +128,9 @@
});
}
-use Data::Dumper; $Data::Dumper::Sortkeys = 1;
+use Data::Dumper; # I should use Data::Peek instead
+ $Data::Dumper::Sortkeys = 1;
+ $Data::Dumper::Indent = 1;
@ARGV or usage 1;
my $file = shift;
@@ -191,6 +193,9 @@
"\e[${attr}m";
} # ansi_color
+
+ binmode STDERR, ":utf8";
+$enc_o and binmode STDOUT, ":encoding($enc_o)";
my $name_len = 30;
if ($opt_i) {
@@ -265,6 +270,10 @@
$opt_c->print (*STDOUT, \@row) or die $opt_c->error_diag;
next;
}
+ if ($opt_n) {
+ unshift @row, $r;
+ unshift @att, [ "#ffffff", "#000000", 0, 0 ];
+ }
if ($opt_L) { # Autofit / Align
push @data, [ [ @row ], [ @att ] ];
next;
@@ -283,6 +292,10 @@
}
printf STDERR $v_fmt, $nc, $h, "\n";
$opt_L or next;
+ if ($opt_n) {
+ unshift @w, length $data[-1][0][0];
+ unshift @align, "";
+ }
my $fmt = join ($opt_s =>
map { my $f = "%$align[$_]$w[$_]s";
$opt_A ? "%s$f%s" : $f } 0 .. $#w)."\n";
Modified: branches/upstream/libspreadsheet-read-perl/current/t/10_basics.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/10_basics.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/10_basics.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/10_basics.t Wed Jun 3 15:32:01 2009
@@ -3,7 +3,8 @@
use strict;
use warnings;
-use Test::More tests => 98;
+use Test::More tests => 99;
+use Test::NoWarnings;
use Spreadsheet::Read qw(:DEFAULT parses rows );
Modified: branches/upstream/libspreadsheet-read-perl/current/t/11_call.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/11_call.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/11_call.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/11_call.t Wed Jun 3 15:32:01 2009
@@ -1,19 +1,16 @@
#!/usr/bin/perl
-
-# Use the sc parser because it's a builtin
use strict;
use warnings;
use Test::More;
+use Test::NoWarnings;
use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("sc")) {
- plan tests => 80;
- }
-else {
- plan skip_all => "No SquirelCalc parser found";
- }
+ Spreadsheet::Read::parses ("sc") or
+ plan skip_all => "No SquirelCalc parser found";
+
+plan tests => 81;
# Base attributes
foreach my $onoff (0, 1) {
Modified: branches/upstream/libspreadsheet-read-perl/current/t/20_csv.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/20_csv.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/20_csv.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/20_csv.t Wed Jun 3 15:32:01 2009
@@ -3,16 +3,15 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 117;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (my $parser = Spreadsheet::Read::parses ("csv")) {
- print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
- plan tests => 117;
- }
-else {
+use Spreadsheet::Read;
+my $parser = Spreadsheet::Read::parses ("csv") or
plan skip_all => "No CSV parser found";
- }
+
+print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
{ my $ref;
$ref = ReadData ("no_such_file.csv");
@@ -84,3 +83,9 @@
is ($csv->[1]{cell}[$c][$r], "", "Unformatted cell $cell");
is ($csv->[1]{$cell}, "", "Formatted cell $cell");
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/21_csv.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/21_csv.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/21_csv.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/21_csv.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 12;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("csv")) {
- plan "no_plan";
- }
-else {
- plan skip_all => "No CSV parser found";
- }
+use Spreadsheet::Read;
+ Spreadsheet::Read::parses ("csv") or
+ plan skip_all => "No CSV parser found";
my $csv;
ok ($csv = ReadData ("files/test.csv"), "Read/Parse csv file");
@@ -29,3 +27,9 @@
is ($csv->[0]{sepchar}, "\t", "{sepchar}");
is ($csv->[0]{quote}, "'", "{quote}");
is ($csv->[1]{C3}, "C3", "cell C3");
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/22_csv.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/22_csv.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/22_csv.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/22_csv.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 4;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("csv")) {
- plan "no_plan";
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("csv") or
plan skip_all => "No CSV parser found";
- }
my $csv;
ok ($csv = ReadData ("files/macosx.csv"), "Read/Parse csv file");
@@ -22,6 +20,12 @@
is ($csv->[1]{maxcol}, 15, "Last column");
is ($csv->[1]{cell}[$csv->[1]{maxcol}][$csv->[1]{maxrow}],
"", "Last field");
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
__END__
ok (1, "Defined fields");
Modified: branches/upstream/libspreadsheet-read-perl/current/t/30_xls.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/30_xls.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/30_xls.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/30_xls.t Wed Jun 3 15:32:01 2009
@@ -3,13 +3,15 @@
use strict;
use warnings;
-use Test::More;
+use Test::More;
+require Test::NoWarnings;
use Spreadsheet::Read;
my $parser;
if ($parser = Spreadsheet::Read::parses ("xls")) {
print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
- plan tests => 217;
+ plan tests => 218;
+ Test::NoWarnings->import;
}
else {
plan skip_all => "No M\$-Excel parser found";
Modified: branches/upstream/libspreadsheet-read-perl/current/t/31_clr.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/31_clr.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/31_clr.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/31_clr.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 256;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xls")) {
- plan tests => 256;
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xls") or
plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
ok ($xls = ReadData ("files/attr.xls", attr => 1), "Excel Attributes testcase");
@@ -43,3 +41,9 @@
is ($clr->{attr}[$col][$row]{bgcolor}, $bg, "BG ($col, $row)");
}
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/32_fmt.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/32_fmt.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/32_fmt.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/32_fmt.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 39;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xls")) {
- plan tests => 39;
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xls") or
plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
ok ($xls = ReadData ("files/attr.xls", attr => 1), "Excel Attributes testcase");
@@ -47,3 +45,9 @@
#foreach my $r (2 .. 12) {
# ok (defined $fmt->{attr}[1][$r]{format}, "Defined format A$r");
# }
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/33_misc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/33_misc.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/33_misc.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/33_misc.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 2;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xls")) {
- plan "no_plan";
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xls") or
plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
@@ -28,3 +26,9 @@
}
ok ($xls, "Open with options");
is ($xls->[0]{sheets}, 3, "Sheet Count");
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/34_dates.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/34_dates.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/34_dates.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/34_dates.t Wed Jun 3 15:32:01 2009
@@ -3,17 +3,15 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 69;
+use Test::More;
+require Test::NoWarnings;
+
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xls") or
+ plan skip_all => "No M\$-Excel parser found";
BEGIN { delete @ENV{qw( LANG LC_ALL LC_DATE )}; }
-
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xls")) {
- plan tests => 69;
- }
-else {
- plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
ok ($xls = ReadData ("files/Dates.xls", attr => 1, dtfmt => "yyyy-mm-dd"), "Excel Date testcase");
@@ -66,3 +64,9 @@
# $cell, $ss->{$cell}, defined $fmt ? "'$fmt'" : "<undef>";
# }
# }
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/35_perc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/35_perc.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/35_perc.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/35_perc.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 77;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xls")) {
- plan tests => 77;
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xls") or
plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
ok ($xls = ReadData ("files/perc.xls", attr => 1), "Excel Percentage testcase");
@@ -27,3 +25,9 @@
my $i = int $ss->{"A$row"};
is ($ss->{"B$row"}, "$i%", "Formatted values for row $row\n");
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/40_sxc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/40_sxc.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/40_sxc.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/40_sxc.t Wed Jun 3 15:32:01 2009
@@ -3,16 +3,15 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 301;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (my $parser = Spreadsheet::Read::parses ("sxc")) {
- print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
- plan tests => 301;
- }
-else {
+use Spreadsheet::Read;
+my $parser = Spreadsheet::Read::parses ("sxc") or
plan skip_all => "No SXC parser found";
- }
+
+print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
my $content;
{ local $/;
@@ -114,3 +113,9 @@
is ("@sheets", "@{['Sheet1','Second Sheet']}", "Sheet order");
}
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/45_ods.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/45_ods.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/45_ods.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/45_ods.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 301;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("ods")) {
- plan tests => 301;
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("ods") or
plan skip_all => "No SXC parser found";
- }
my $content;
{ local $/;
@@ -113,3 +111,9 @@
is ("@sheets", "@{['Sheet1','Second Sheet']}", "Sheet order");
}
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/46_clr.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/46_clr.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/46_clr.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/46_clr.t Wed Jun 3 15:32:01 2009
@@ -3,20 +3,17 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 256;
+use Test::More;
+require Test::NoWarnings;
use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("ods")) {
- if ((my $v = $Spreadsheet::ReadSXC::VERSION) <= 0.20) {
- plan skip_all => "Spreadsheet::ReadSXC version $v doesn't support field attributes";
- }
- else {
- plan tests => 256;
- }
- }
-else {
+my $parser = Spreadsheet::Read::parses ("ods") or
plan skip_all => "No OpenOffice ODS parser found";
- }
+
+$parser->VERSION <= 0.20 and
+ plan skip_all => "Spreadsheet::ReadSXC version " . $parser->VERSION .
+ " doesn't support field attributes";
my $ods;
ok ($ods = ReadData ("files/attr.ods", attr => 1), "Excel Attributes testcase");
@@ -48,3 +45,9 @@
is ($clr->{attr}[$col][$row]{bgcolor}, $bg, "BG ($col, $row)");
}
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/50_sc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/50_sc.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/50_sc.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/50_sc.t Wed Jun 3 15:32:01 2009
@@ -3,16 +3,15 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 48;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (my $parser = Spreadsheet::Read::parses ("sc")) {
- print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
- plan tests => 48;
- }
-else {
+use Spreadsheet::Read;
+my $parser = Spreadsheet::Read::parses ("sc") or
plan skip_all => "No SquirelCalc parser found";
- }
+
+print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
{ my $ref;
$ref = ReadData ("no_such_file.sc");
@@ -51,3 +50,9 @@
is ($sc->[1]{cell}[1][22], " Workspace", "Just checking one cell");
}
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/60_xls.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/60_xls.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/60_xls.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/60_xls.t Wed Jun 3 15:32:01 2009
@@ -3,16 +3,16 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 62;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (my $parser = Spreadsheet::Read::parses ("xlsx")) {
- print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
- plan tests => 62;
- }
-else {
+use Spreadsheet::Read;
+
+my $parser = Spreadsheet::Read::parses ("xlsx") or
plan skip_all => "No M\$-Excel parser found";
- }
+
+print STDERR "# Parser: $parser-", $parser->VERSION, "\n";
{ my $ref;
$ref = ReadData ("no_such_file.xlsx");
@@ -80,3 +80,9 @@
is ($ss->{D1}, "0", "formatted numeric 0");
is ($ss->{E1}, "1", "formatted numeric 1");
is ($ss->{F1}, "", "formatted a single '");
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/61_clr.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/61_clr.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/61_clr.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/61_clr.t Wed Jun 3 15:32:01 2009
@@ -3,39 +3,37 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 257;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xlsx")) {
- plan tests => 256;
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xlsx") or
plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
ok ($xls = ReadData ("files/attr.xlsx", attr => 1), "Excel Attributes testcase");
SKIP: {
- $xls->[0]{version} <= 0.09 and
- skip "$xls->[0]{parser} $xls->[0]{version} does not reliably support colours", 255;
+ ok (my $clr = $xls->[$xls->[0]{sheet}{Colours}], "colours");
- my $clr = $xls->[$xls->[0]{sheet}{Colours}];
+ defined $clr->{attr}[2][2]{fgcolor} or
+ skip "$xls->[0]{parser} $xls->[0]{version} does not reliably support colours yet", 255;
is ($clr->{cell}[1][1], "auto", "Auto");
is ($clr->{attr}[1][1]{fgcolor}, undef, "Unspecified font color");
is ($clr->{attr}[1][1]{bgcolor}, undef, "Unspecified fill color");
my @clr = ( [],
- [ "auto", undef ],
- [ "red", "#ff0000" ],
- [ "green", "#008000" ],
- [ "blue", "#0000ff" ],
- [ "white", "#ffffff" ],
- [ "yellow", "#ffff00" ],
+ [ "auto", undef ],
+ [ "red", "#ff0000" ],
+ [ "green", "#008000" ],
+ [ "blue", "#0000ff" ],
+ [ "white", "#ffffff" ],
+ [ "yellow", "#ffff00" ],
[ "lightgreen", "#00ff00" ],
[ "lightblue", "#00ccff" ],
- [ "gray", "#808080" ],
+ [ "gray", "#808080" ],
);
foreach my $col (1 .. $#clr) {
my $bg = $clr[$col][1];
@@ -48,3 +46,9 @@
}
}
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/62_fmt.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/62_fmt.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/62_fmt.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/62_fmt.t Wed Jun 3 15:32:01 2009
@@ -3,29 +3,27 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 40;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xlsx")) {
- plan tests => 39;
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xlsx") or
plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
ok ($xls = ReadData ("files/attr.xlsx", attr => 1), "Excel Attributes testcase");
SKIP: {
- $xls->[0]{version} <= 0.09 and
- skip "$xls->[0]{parser} $xls->[0]{version} does not reliably support attributes", 38;
+ ok (my $fmt = $xls->[$xls->[0]{sheet}{Format}], "format");
- my $fmt = $xls->[$xls->[0]{sheet}{Format}];
+ $fmt->{attr}[2][2]{merged} or
+ skip "$xls->[0]{parser} $xls->[0]{version} does not reliably support attributes yet", 38;
is ($fmt->{B2}, "merged", "Merged cell left formatted");
- is ($fmt->{C2}, "", "Merged cell right formatted");
+ is ($fmt->{C2}, undef, "Merged cell right formatted");
is ($fmt->{cell}[2][2], "merged", "Merged cell left unformatted");
- is ($fmt->{cell}[3][2], "", "Merged cell right unformatted");
+ is ($fmt->{cell}[3][2], undef, "Merged cell right unformatted");
is ($fmt->{attr}[2][2]{merged}, 1, "Merged cell left merged");
is ($fmt->{attr}[3][2]{merged}, 1, "Merged cell right merged");
@@ -52,3 +50,9 @@
# ok (defined $fmt->{attr}[1][$r]{format}, "Defined format A$r");
# }
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/63_misc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/63_misc.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/63_misc.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/63_misc.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 2;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xlsx")) {
- plan "no_plan";
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xlsx") or
plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
@@ -28,3 +26,9 @@
}
ok ($xls, "Open with options");
is ($xls->[0]{sheets}, 3, "Sheet Count");
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/64_dates.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/64_dates.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/64_dates.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/64_dates.t Wed Jun 3 15:32:01 2009
@@ -3,27 +3,25 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 71;
+use Test::More;
+require Test::NoWarnings;
+
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xlsx") or
+ plan skip_all => "No M\$-Excel parser found";
BEGIN { delete @ENV{qw( LANG LC_ALL LC_DATE )}; }
-
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xlsx")) {
- plan tests => 69;
- }
-else {
- plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
ok ($xls = ReadData ("files/Dates.xlsx", attr => 1, dtfmt => "yyyy-mm-dd"), "Excel Date testcase");
SKIP: {
- $xls->[0]{version} <= 0.09 and
+ ok (my $ss = $xls->[1], "sheet");
+ ok (my $attr = $ss->{attr}, "attr");
+
+ defined $attr->[2][1]{format} or
skip "$xls->[0]{parser} $xls->[0]{version} does not reliably support formats", 68;
-
- my $ss = $xls->[1];
- my $attr = $ss->{attr};
my @date = (undef, 39668, 39672, 39790, 39673);
my @fmt = (undef, undef, "yyyymmdd", "yyyy-mm-dd", "mm/dd/yyyy");
@@ -59,3 +57,9 @@
is ($ss->{E3}, "08 Dec 2008", "Cell content E3");
is ($ss->{E4}, "13 Aug 2008", "Cell content E4");
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
Modified: branches/upstream/libspreadsheet-read-perl/current/t/65_perc.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libspreadsheet-read-perl/current/t/65_perc.t?rev=37359&op=diff
==============================================================================
--- branches/upstream/libspreadsheet-read-perl/current/t/65_perc.t (original)
+++ branches/upstream/libspreadsheet-read-perl/current/t/65_perc.t Wed Jun 3 15:32:01 2009
@@ -3,15 +3,13 @@
use strict;
use warnings;
-use Test::More;
+my $tests = 77;
+use Test::More;
+require Test::NoWarnings;
-use Spreadsheet::Read;
-if (Spreadsheet::Read::parses ("xlsx")) {
- plan tests => 77;
- }
-else {
+use Spreadsheet::Read;
+Spreadsheet::Read::parses ("xlsx") or
plan skip_all => "No M\$-Excel parser found";
- }
my $xls;
ok ($xls = ReadData ("files/perc.xlsx", attr => 1), "Excel Percentage testcase");
@@ -25,9 +23,15 @@
is ($ss->{attr}[3][$row]{type}, "percentage", "Type C$row percentage");
SKIP: {
- $xls->[0]{version} <= 0.09 and
+ $ss->{B18} =~ m/[.]/ and
skip "$xls->[0]{parser} $xls->[0]{version} has format problems", 1;
my $i = int $ss->{"A$row"};
is ($ss->{"B$row"}, "$i%", "Formatted values for row $row\n");
}
}
+
+unless ($ENV{AUTOMATED_TESTING}) {
+ Test::NoWarnings::had_no_warnings ();
+ $tests++;
+ }
+done_testing ($tests);
More information about the Pkg-perl-cvs-commits
mailing list