r57425 - in /trunk/libtext-csv-xs-perl: CSV_XS.pm ChangeLog META.yml Makefile.PL debian/changelog examples/csv2xls ppport.h t/20_file.t t/21_lexicalio.t t/22_scalario.t t/41_null.t t/65_allow.t t/70_rt.t t/75_hashref.t t/76_magic.t
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Tue May 4 03:23:44 UTC 2010
Author: ansgar-guest
Date: Tue May 4 03:23:35 2010
New Revision: 57425
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=57425
Log:
IGNORE-VERSION: 0.73-1
Only minor update to documentation, some changes to tests.
Modified:
trunk/libtext-csv-xs-perl/CSV_XS.pm
trunk/libtext-csv-xs-perl/ChangeLog
trunk/libtext-csv-xs-perl/META.yml
trunk/libtext-csv-xs-perl/Makefile.PL
trunk/libtext-csv-xs-perl/debian/changelog
trunk/libtext-csv-xs-perl/examples/csv2xls
trunk/libtext-csv-xs-perl/ppport.h
trunk/libtext-csv-xs-perl/t/20_file.t
trunk/libtext-csv-xs-perl/t/21_lexicalio.t
trunk/libtext-csv-xs-perl/t/22_scalario.t
trunk/libtext-csv-xs-perl/t/41_null.t
trunk/libtext-csv-xs-perl/t/65_allow.t
trunk/libtext-csv-xs-perl/t/70_rt.t
trunk/libtext-csv-xs-perl/t/75_hashref.t
trunk/libtext-csv-xs-perl/t/76_magic.t
Modified: trunk/libtext-csv-xs-perl/CSV_XS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/CSV_XS.pm?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/CSV_XS.pm (original)
+++ trunk/libtext-csv-xs-perl/CSV_XS.pm Tue May 4 03:23:35 2010
@@ -30,7 +30,7 @@
use Carp;
use vars qw( $VERSION @ISA );
-$VERSION = "0.72";
+$VERSION = "0.73";
@ISA = qw( DynaLoader );
bootstrap Text::CSV_XS $VERSION;
@@ -1515,6 +1515,11 @@
unusable on EBCDIC system. Using some #ifdef structure could enable
these again without loosing speed. Testing would be the hard part.
+Opening EBCDIC encode files on ASCII+ systems is likely to succeed
+using Encode's cp37, cp1047, or posix-bc:
+
+ open my $fh, "<:encoding(cp1047)", "ebcdic_file.csv" or die "...";
+
=back
=head1 Release plan
Modified: trunk/libtext-csv-xs-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/ChangeLog?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/ChangeLog (original)
+++ trunk/libtext-csv-xs-perl/ChangeLog Tue May 4 03:23:35 2010
@@ -1,3 +1,11 @@
+2010-05-03 0.73 - H.Merijn Brand <h.m.brand at xs4all.nl>
+
+ * Improve date conversion in examples/csv2xls
+ new option -D allows column selection for date conversions
+ * Tested under perl-5.12.0 (and 21 other versions of perl)
+ * Added a note about EBCDIC data files
+ * Test suite is now safe for parallel test (prove --shuffle -j6)
+
2010-03-16 0.72 - H.Merijn Brand <h.m.brand at xs4all.nl>
* Introduce quote_null attribute (RT#55200)
Modified: trunk/libtext-csv-xs-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/META.yml?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/META.yml (original)
+++ trunk/libtext-csv-xs-perl/META.yml Tue May 4 03:23:35 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Text-CSV_XS
-version: 0.72
+version: 0.73
abstract: Comma-Separated Values manipulation routines
license: perl
author:
@@ -10,7 +10,7 @@
provides:
Text::CSV_XS:
file: CSV_XS.pm
- version: 0.72
+ version: 0.73
requires:
perl: 5.005
DynaLoader: 0
Modified: trunk/libtext-csv-xs-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/Makefile.PL?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/Makefile.PL (original)
+++ trunk/libtext-csv-xs-perl/Makefile.PL Tue May 4 03:23:35 2010
@@ -79,7 +79,7 @@
'',
'leakcheck:',
" $valgrind",
- ' - at tail -5 valgrind.log',
+ ' - at tail -14 valgrind.log',
'',
'leaktest:',
q{ sandbox/leaktest $(FULLPERLRUN) "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)},
Modified: trunk/libtext-csv-xs-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/debian/changelog?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/debian/changelog (original)
+++ trunk/libtext-csv-xs-perl/debian/changelog Tue May 4 03:23:35 2010
@@ -1,3 +1,10 @@
+libtext-csv-xs-perl (0.73-1) UNRELEASED; urgency=low
+
+ IGNORE-VERSION: 0.73-1
+ Only minor update to documentation, some changes to tests.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org> Tue, 04 May 2010 11:55:59 +0900
+
libtext-csv-xs-perl (0.72-1) unstable; urgency=low
* New upstream release
Modified: trunk/libtext-csv-xs-perl/examples/csv2xls
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/examples/csv2xls?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/examples/csv2xls (original)
+++ trunk/libtext-csv-xs-perl/examples/csv2xls Tue May 4 03:23:35 2010
@@ -1,12 +1,12 @@
#!/pro/bin/perl
# csv2xls: Convert csv to xls
-# (m)'10 [15 Mar 2008] Copyright H.M.Brand 2007-2010
+# (m)'10 [15 Apr 2010] Copyright H.M.Brand 2007-2010
use strict;
use warnings;
-our $VERSION = "1.62";
+our $VERSION = "1.70";
sub usage
{
@@ -28,6 +28,7 @@
an equal sign are forced to string
-f force usage of <xls> if already exists (unlink before use)
-d <dtfmt> use <dtfmt> as date formats. Default = 'dd-mm-yyyy'
+ -D cols only convert dates in columns <cols>. Default is everywhere.
-u CSV is UTF8
-v [<lvl>] verbosity (default = 1)
EOU
@@ -45,6 +46,7 @@
my $frm = 0; # Allow formula's
my $dtf = "dd-mm-yyyy"; # Date format
my $opt_v = 1;
+my $dtc;
GetOptions (
"help|?" => sub { usage (0); },
@@ -55,6 +57,7 @@
"w=i" => \$wdt,
"o|x=s" => \$xls,
"d=s" => \$dtf,
+ "D=s" => \$dtc,
"f" => \$frc,
"F" => \$frm,
"u" => \$utf,
@@ -140,6 +143,13 @@
printf STDERR "%-11s = %s\n", $k, $c;
}
}
+
+if (my $rows = $dtc) {
+ $rows =~ s/-$/-999/; # 3,6-
+ $rows =~ s/-/../g;
+ eval "\$dtc = { map { \$_ => 1 } $rows }";
+ }
+
while ($row && @$row or $row = $csv->getline (*ARGV)) {
my @row = @$row;
@row > $w and push @w, ($wdt) x (($w = @row) - @w);
@@ -165,16 +175,20 @@
next;
}
- my @d = (0, 0, 0); # Y, M, D
- $val =~ m/^(\d{4})(\d{2})(\d{2})$/ and @d = ($1, $2, $3);
- $val =~ m/^(\d{2})-(\d{2})-(\d{4})$/ and @d = ($3, $2, $1);
- if ($d[1] >= 1 && $d[1] <= 12 && $d[0] >= 1900) {
- my $dm = Days_in_Month (@d[0,1]);
- $d[2] < 1 and $d[2] = 1;
- $d[2] > $dm and $d[2] = $dm;
- my $dt = 2 + Delta_Days (1900, 1, 1, @d);
- $wks->write ($h, $c, $dt, $fmt{date});
- next;
+ if (!$dtc or $dtc->{$c + 1}) {
+ my @d = (0, 0, 0); # Y, M, D
+ $val =~ m/^(\d{4})(\d{2})(\d{2})$/ and @d = ($1, $2, $3);
+ $val =~ m/^(\d{2})-(\d{2})-(\d{4})$/ and @d = ($3, $2, $1);
+ if ( $d[2] >= 1 && $d[2] <= 31 &&
+ $d[1] >= 1 && $d[1] <= 12 &&
+ $d[0] >= 1900 && $d[0] <= 2199) {
+ my $dm = Days_in_Month (@d[0,1]);
+ $d[2] < 1 and $d[2] = 1;
+ $d[2] > $dm and $d[2] = $dm;
+ my $dt = 2 + Delta_Days (1900, 1, 1, @d);
+ $wks->write ($h, $c, $dt, $fmt{date});
+ next;
+ }
}
if (!$frm && $val =~ m/^=/) {
Modified: trunk/libtext-csv-xs-perl/ppport.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/ppport.h?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/ppport.h (original)
+++ trunk/libtext-csv-xs-perl/ppport.h Tue May 4 03:23:35 2010
@@ -6,7 +6,7 @@
ppport.h -- Perl/Pollution/Portability Version 3.19
- Automatically created by Devel::PPPort running under perl 5.010000.
+ Automatically created by Devel::PPPort running under perl 5.012000.
Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
includes in parts/inc/ instead.
Modified: trunk/libtext-csv-xs-perl/t/20_file.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/t/20_file.t?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/t/20_file.t (original)
+++ trunk/libtext-csv-xs-perl/t/20_file.t Tue May 4 03:23:35 2010
@@ -37,15 +37,15 @@
) {
my ($tst, $validp, $validg, @arg, $row) = @$_;
- open FH, ">_test.csv" or die "_test.csv: $!";
+ open FH, ">_20test.csv" or die "_20test.csv: $!";
is ($csv->print (*FH, \@arg), $validp||"", "$tst - print ()");
close FH;
- open FH, ">_test.csv" or die "_test.csv: $!";
+ open FH, ">_20test.csv" or die "_20test.csv: $!";
print FH join ",", @arg;
close FH;
- open FH, "<_test.csv" or die "_test.csv: $!";
+ open FH, "<_20test.csv" or die "_20test.csv: $!";
$row = $csv->getline (*FH);
unless ($validg) {
is ($row, undef, "$tst - false getline ()");
@@ -59,12 +59,12 @@
}
}
-unlink "_test.csv";
+unlink "_20test.csv";
# This test because of a problem with DBD::CSV
ok (1, "Tests for DBD::CSV");
-open FH, ">_test.csv" or die "_test.csv: $!";
+open FH, ">_20test.csv" or die "_20test.csv: $!";
$csv->binary (1);
$csv->eol ("\r\n");
ok ($csv->print (*FH, [ "id", "name" ]), "Bad character");
@@ -84,14 +84,14 @@
5\015
CONTENTS
-open FH, "<_test.csv" or die "_test.csv: $!";
+open FH, "<_20test.csv" or die "_20test.csv: $!";
my $content = do { local $/; <FH> };
close FH;
is ($content, $expected, "Content");
-open FH, ">_test.csv" or die "_test.csv: $!";
+open FH, ">_20test.csv" or die "_20test.csv: $!";
print FH $content;
close FH;
-open FH, "<_test.csv" or die "_test.csv: $!";
+open FH, "<_20test.csv" or die "_20test.csv: $!";
my $fields;
print "# Retrieving data\n";
@@ -129,10 +129,10 @@
[ 22, 0, 2025, qq{"+\r\r+"\r} ],
) {
my ($tst, $valid, $err, $str) = @$_;
- open FH, ">_test.csv" or die "_test.csv: $!";
+ open FH, ">_20test.csv" or die "_20test.csv: $!";
print FH $str;
close FH;
- open FH, "<_test.csv" or die "_test.csv: $!";
+ open FH, "<_20test.csv" or die "_20test.csv: $!";
my $row = $csv->getline (*FH);
close FH;
my @err = $csv->error_diag;
@@ -145,4 +145,4 @@
}
}
-unlink "_test.csv";
+unlink "_20test.csv";
Modified: trunk/libtext-csv-xs-perl/t/21_lexicalio.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/t/21_lexicalio.t?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/t/21_lexicalio.t (original)
+++ trunk/libtext-csv-xs-perl/t/21_lexicalio.t Tue May 4 03:23:35 2010
@@ -47,15 +47,15 @@
) {
my ($tst, $validp, $validg, @arg, $row) = @$_;
- open $io, ">_test.csv" or die "_test.csv: $!";
+ open $io, ">_21test.csv" or die "_21test.csv: $!";
is ($csv->print ($io, \@arg), $validp||"", "$tst - print ()");
close $io;
- open $io, ">_test.csv" or die "_test.csv: $!";
+ open $io, ">_21test.csv" or die "_21test.csv: $!";
print $io join ",", @arg;
close $io;
- open $io, "<_test.csv" or die "_test.csv: $!";
+ open $io, "<_21test.csv" or die "_21test.csv: $!";
$row = $csv->getline ($io);
unless ($validg) {
is ($row, undef, "$tst - false getline ()");
@@ -69,12 +69,12 @@
}
}
-unlink "_test.csv";
+unlink "_21test.csv";
# This test because of a problem with DBD::CSV
ok (1, "Tests for DBD::CSV");
-open $io, ">_test.csv" or die "_test.csv: $!";
+open $io, ">_21test.csv" or die "_21test.csv: $!";
$csv->binary (1);
$csv->eol ("\r\n");
ok ($csv->print ($io, [ "id", "name" ]), "Bad character");
@@ -94,14 +94,14 @@
5\015
CONTENTS
-open $io, "<_test.csv" or die "_test.csv: $!";
+open $io, "<_21test.csv" or die "_21test.csv: $!";
my $content = do { local $/; <$io> };
close $io;
is ($content, $expected, "Content");
-open $io, ">_test.csv" or die "_test.csv: $!";
+open $io, ">_21test.csv" or die "_21test.csv: $!";
print $io $content;
close $io;
-open $io, "<_test.csv" or die "_test.csv: $!";
+open $io, "<_21test.csv" or die "_21test.csv: $!";
my $fields;
print "# Retrieving data\n";
@@ -139,10 +139,10 @@
[ 22, 0, 2025, qq{"+\r\r+"\r} ],
) {
my ($tst, $valid, $err, $str) = @$_;
- open my $io, ">_test.csv" or die "_test.csv: $!";
+ open my $io, ">_21test.csv" or die "_21test.csv: $!";
print $io $str;
close $io;
- open $io, "<_test.csv" or die "_test.csv: $!";
+ open $io, "<_21test.csv" or die "_21test.csv: $!";
my $row = $csv->getline ($io);
close $io;
my @err = $csv->error_diag;
@@ -155,4 +155,4 @@
}
}
-unlink "_test.csv";
+unlink "_21test.csv";
Modified: trunk/libtext-csv-xs-perl/t/22_scalario.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/t/22_scalario.t?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/t/22_scalario.t (original)
+++ trunk/libtext-csv-xs-perl/t/22_scalario.t Tue May 4 03:23:35 2010
@@ -50,15 +50,15 @@
) {
my ($tst, $validp, $validg, @arg, $row) = @$_;
- open $io, ">", \$io_str or die "_test.csv: $!";
+ open $io, ">", \$io_str or die "_22test.csv: $!";
is ($csv->print ($io, \@arg), $validp||"", "$tst - print ()");
close $io;
- open $io, ">", \$io_str or die "_test.csv: $!";
+ open $io, ">", \$io_str or die "_22test.csv: $!";
print $io join ",", @arg;
close $io;
- open $io, "<", \$io_str or die "_test.csv: $!";
+ open $io, "<", \$io_str or die "_22test.csv: $!";
$row = $csv->getline ($io);
unless ($validg) {
is ($row, undef, "$tst - false getline ()");
@@ -72,12 +72,12 @@
}
}
-unlink "_test.csv";
+unlink "_22test.csv";
# This test because of a problem with DBD::CSV
ok (1, "Tests for DBD::CSV");
-open $io, ">", \$io_str or die "_test.csv: $!";
+open $io, ">", \$io_str or die "_22test.csv: $!";
$csv->binary (1);
$csv->eol ("\r\n");
ok ($csv->print ($io, [ "id", "name" ]), "Bad character");
@@ -97,14 +97,14 @@
5\015
CONTENTS
-open $io, "<", \$io_str or die "_test.csv: $!";
+open $io, "<", \$io_str or die "_22test.csv: $!";
my $content = do { local $/; <$io> };
close $io;
is ($content, $expected, "Content");
-open $io, ">", \$io_str or die "_test.csv: $!";
+open $io, ">", \$io_str or die "_22test.csv: $!";
print $io $content;
close $io;
-open $io, "<", \$io_str or die "_test.csv: $!";
+open $io, "<", \$io_str or die "_22test.csv: $!";
my $fields;
print "# Retrieving data\n";
@@ -143,7 +143,7 @@
) {
my ($tst, $valid, $err, $str) = @$_;
$io_str = $str;
- open $io, "<", \$io_str or die "_test.csv: $!";
+ open $io, "<", \$io_str or die "_22test.csv: $!";
my $row = $csv->getline ($io);
close $io;
my @err = $csv->error_diag;
Modified: trunk/libtext-csv-xs-perl/t/41_null.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/t/41_null.t?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/t/41_null.t (original)
+++ trunk/libtext-csv-xs-perl/t/41_null.t Tue May 4 03:23:35 2010
@@ -50,7 +50,7 @@
ok ($csv->combine (@$line), "combine [ ... ]");
is ($csv->string, qq{,,"0\n",,""0"0\n0"\n}, "string");
-open FH, ">__test.csv" or die $!;
+open FH, ">__41test.csv" or die $!;
binmode FH;
for (@pat) {
@@ -63,7 +63,7 @@
close FH;
-open FH, "<__test.csv" or die $!;
+open FH, "<__41test.csv" or die $!;
binmode FH;
foreach my $pat (@pat) {
@@ -75,7 +75,7 @@
close FH;
-unlink "__test.csv";
+unlink "__41test.csv";
$csv = Text::CSV_XS->new ({
eol => "\n",
@@ -88,7 +88,7 @@
ok ($csv->combine (@$line), "combine [ ... ]");
is ($csv->string, qq{,,"0\n",,"\0\0\n0"\n}, "string");
-open FH, ">__test.csv" or die $!;
+open FH, ">__41test.csv" or die $!;
binmode FH;
for (@pat) {
@@ -101,7 +101,7 @@
close FH;
-open FH, "<__test.csv" or die $!;
+open FH, "<__41test.csv" or die $!;
binmode FH;
foreach my $pat (@pat) {
@@ -113,4 +113,4 @@
close FH;
-unlink "__test.csv";
+unlink "__41test.csv";
Modified: trunk/libtext-csv-xs-perl/t/65_allow.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/t/65_allow.t?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/t/65_allow.t (original)
+++ trunk/libtext-csv-xs-perl/t/65_allow.t Tue May 4 03:23:35 2010
@@ -324,14 +324,14 @@
}
ok (1, "verbatim on getline (*FH)");
- open FH, ">_test.csv";
+ open FH, ">_65test.csv";
print FH @str, "M^Abe^*\r\n";
close FH;
foreach $gc (0, 1) {
$csv->verbatim ($gc);
- open FH, "<_test.csv";
+ open FH, "<_65test.csv";
my $row;
ok ($row = $csv->getline (*FH), "#\\r\\n $gc getline");
@@ -358,27 +358,27 @@
verbatim => 1,
eol => "#\r\n",
});
- open FH, ">_test.csv";
+ open FH, ">_65test.csv";
print FH $str[1];
close FH;
- open FH, "<_test.csv";
+ open FH, "<_65test.csv";
is ($csv->getline (*FH), undef, "#\\r\\n $gc getline 2030");
is (0 + $csv->error_diag, 2030, "Got 2030");
close FH;
- unlink "_test.csv";
+ unlink "_65test.csv";
}
{ ok (1, "keep_meta_info on getline ()");
my $csv = Text::CSV_XS->new ({ eol => "\n" });
- open FH, ">_test.csv";
+ open FH, ">_65test.csv";
print FH qq{1,"",,"Q",2\n};
close FH;
is ($csv->keep_meta_info (0), 0, "No meta info");
- open FH, "<_test.csv";
+ open FH, "<_65test.csv";
my $row = $csv->getline (*FH);
ok ($row, "Get 1st line");
$csv->error_diag ();
@@ -386,19 +386,19 @@
is ($csv->is_quoted (3), undef, "Is field 3 quoted?");
close FH;
- open FH, ">_test.csv";
+ open FH, ">_65test.csv";
print FH qq{1,"",,"Q",2\n};
close FH;
is ($csv->keep_meta_info (1), 1, "Keep meta info");
- open FH, "<_test.csv";
+ open FH, "<_65test.csv";
$row = $csv->getline (*FH);
ok ($row, "Get 2nd line");
$csv->error_diag ();
is ($csv->is_quoted (2), 0, "Is field 2 quoted?");
is ($csv->is_quoted (3), 1, "Is field 3 quoted?");
close FH;
- unlink "_test.csv";
+ unlink "_65test.csv";
}
{ my $csv = Text::CSV_XS->new ({});
Modified: trunk/libtext-csv-xs-perl/t/70_rt.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/t/70_rt.t?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/t/70_rt.t (original)
+++ trunk/libtext-csv-xs-perl/t/70_rt.t Tue May 4 03:23:35 2010
@@ -11,7 +11,7 @@
plan skip_all => "Cannot load Text::CSV_XS" if $@;
}
-my $csv_file = "_test.csv";
+my $csv_file = "_70test.csv";
END { unlink $csv_file }
my ($rt, %input, %desc);
Modified: trunk/libtext-csv-xs-perl/t/75_hashref.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/t/75_hashref.t?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/t/75_hashref.t (original)
+++ trunk/libtext-csv-xs-perl/t/75_hashref.t Tue May 4 03:23:35 2010
@@ -11,7 +11,7 @@
plan skip_all => "Cannot load Text::CSV_XS" if $@;
}
-open FH, ">_test.csv";
+open FH, ">_75test.csv";
print FH <<EOC;
code,name,price,description
1,Dress,240.00,"Evening gown"
@@ -46,7 +46,7 @@
ok ($csv->column_names ("name", "code"), "column_names (list)");
is_deeply ([ $csv->column_names ], [ "name", "code" ], "well set");
-open FH, "<_test.csv";
+open FH, "<_75test.csv";
my $row;
ok ($row = $csv->getline (*FH), "getline headers");
is ($row->[0], "code", "Header line");
@@ -76,7 +76,7 @@
is ($csv->error_diag () + 0, 3004, "legal header defenition");
my @bcr = \($code, $name, $price, $desc);
-open FH, "<_test.csv";
+open FH, "<_75test.csv";
ok ($row = $csv->getline (*FH), "getline headers");
ok ($csv->bind_columns (@bcr), "Bind columns");
ok ($csv->column_names ($row), "column_names from array_ref");
@@ -109,7 +109,7 @@
close FH;
-open FH, "<_test.csv";
+open FH, "<_75test.csv";
is ($csv->column_names (undef), undef, "reset column headers");
is ($csv->bind_columns (undef), undef, "reset bound columns");
@@ -122,4 +122,4 @@
close FH;
-unlink "_test.csv";
+unlink "_75test.csv";
Modified: trunk/libtext-csv-xs-perl/t/76_magic.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-csv-xs-perl/t/76_magic.t?rev=57425&op=diff
==============================================================================
--- trunk/libtext-csv-xs-perl/t/76_magic.t (original)
+++ trunk/libtext-csv-xs-perl/t/76_magic.t Tue May 4 03:23:35 2010
@@ -25,12 +25,12 @@
}
tie $foo, "Foo";
-open FH, ">_test.csv";
+open FH, ">_76test.csv";
ok ($csv->print (*FH, $foo), "print with unused magic scalar");
close FH;
untie $foo;
-open FH, "<_test.csv";
+open FH, "<_76test.csv";
is_deeply ($csv->getline (*FH), \@foo, "Content read-back");
close FH;
@@ -39,7 +39,7 @@
untie $foo;
is_deeply ([$csv->column_names], \@foo, "column_names ()");
-unlink "_test.csv";
+unlink "_76test.csv";
package Foo;
More information about the Pkg-perl-cvs-commits
mailing list