Skip Menu |

This queue is for tickets about the DBD-CSV CPAN distribution.

Report information
The Basics
Id: 50544
Status: resolved
Priority: 0/
Queue: DBD-CSV

People
Owner: Nobody in particular
Requestors: taro.nishino [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.24_01
Fixed in: 0.26



Subject: tests fixes
Hi H.Merijn, 71_csv-ext.t, 72_csv-schema.t and 80_rt.t end in failure under MSWIN32. Those failures relate to getpwuid, but getpwuid returns only the empty. May I ask you a favour? Could you apply the attached patches? Best regards, Taro Nishino
Subject: 72_csv-schema.t.diff.txt
--- 72_csv-schema.t.orig Fri Oct 16 10:25:29 2009 +++ 72_csv-schema.t Fri Oct 16 10:57:41 2009 @@ -24,8 +24,14 @@ my $usr = eval { getpwuid $< }; $usr and $usr = qq{"$usr"}; +if ($usr) { is_deeply ([ $dbh->tables () ], [ qq{$usr.$tbl} ], "tables"); +} +else { + is_deeply ([ $dbh->tables () ], + [ qq{$tbl} ], "tables"); +} ok ($dbh->disconnect, "disconnect"); undef $dbh;
Subject: 80_rt.t.diff.txt
--- 80_rt.t.orig Fri Oct 16 10:51:21 2009 +++ 80_rt.t Fri Oct 16 10:52:15 2009 @@ -194,6 +194,7 @@ ok ($sth->finish, "finish"); open my $fh, "<", DbFile ("RT$rt.csv"); + binmode $fh; is (scalar <$fh>, qq{name,id\r\n}, "Field names"); is (scalar <$fh>, qq{Tim,1\r\n}, "Record 1"); is (scalar <$fh>, qq{Tux,2\r\n}, "Record 2");
Subject: 71_csv-ext.t.diff.txt
--- 71_csv-ext.t.orig Thu Oct 15 19:58:18 2009 +++ 71_csv-ext.t Fri Oct 16 11:00:57 2009 @@ -23,9 +23,7 @@ if ($usr) { s/^['"]*$usr["']*\.// for @tbl; } - else { - s/^[^.]+\.// for @tbl; - } + sort @tbl; } # Tables
Subject: Re: [rt.cpan.org #50544] tests fixes
Date: Fri, 16 Oct 2009 08:33:25 +0200
To: bug-DBD-CSV [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Thu, 15 Oct 2009 22:57:35 -0400, "Taro Nishino via RT" Show quoted text
> Hi H.Merijn, > > 71_csv-ext.t, 72_csv-schema.t and 80_rt.t end in failure under MSWIN32. > Those failures relate to getpwuid, but getpwuid returns only the empty. > May I ask you a favour? Could you apply the attached patches?
Looks sane. Reminds me to test under windows too. Thanks -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Subject: Re: [rt.cpan.org #50544] tests fixes
Date: Fri, 16 Oct 2009 12:05:57 +0200
To: bug-DBD-CSV [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Thu, 15 Oct 2009 22:57:35 -0400, "Taro Nishino via RT" Show quoted text
> 71_csv-ext.t, 72_csv-schema.t and 80_rt.t end in failure under MSWIN32. > Those failures relate to getpwuid, but getpwuid returns only the empty. > May I ask you a favour? Could you apply the attached patches?
regarding 72, would this be ok with you? I have currently no access to a working windows development environment. --8<--- diff --git a/t/72_csv-schema.t b/t/72_csv-schema.t index 7058b86..13bb5ad 100644 --- a/t/72_csv-schema.t +++ b/t/72_csv-schema.t @@ -22,10 +22,15 @@ like (my $def = TableDefinition ($tbl, @tbl_def), qr{^create table $tbl}i, "table definition"); ok ($dbh->do ($def), "create table"); -my $usr = eval { getpwuid $< }; - $usr and $usr = qq{"$usr"}; -is_deeply ([ $dbh->tables () ], - [ qq{$usr.$tbl} ], "tables"); +if (my $usr = eval { getpwuid $< }) { + $usr = qq{"$usr"}; + is_deeply ([ $dbh->tables () ], + [ qq{$usr.$tbl} ], "tables"); + } +else { + is_deeply ([ $dbh->tables () ], + [ qq{$tbl} ], "tables"); + } ok ($dbh->disconnect, "disconnect"); undef $dbh; -->8--- regarding 80, done. regarding 71, can you explain why that would be needed? -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Subject: Re: [rt.cpan.org #50544] tests fixes
Date: Fri, 16 Oct 2009 19:58:41 +0900
To: bug-DBD-CSV [...] rt.cpan.org
From: Taro Nishino <taro.nishino [...] gmail.com>
On Fri, 16 Oct 2009 06:06:16 -0400 "h.m.brand@xs4all.nl via RT" <bug-DBD-CSV@rt.cpan.org> wrote: Show quoted text
> regarding 72, would this be ok with you? I have currently no access to > a working windows development environment. >
72_csv-schema.t works well as follows: C:\temp\DBD-CSV-0.25>prove -vb t/72_csv-schema.t t/72_csv-schema.t .. 1..12 ok 1 - use DBI; ok 2 - connect ok 3 - find new test table ok 4 - table definition ok 5 - create table ok 6 - tables ok 7 - disconnect ok 8 - connect (f_schema => undef) ok 9 - tables ok 10 - drop table ok 11 - disconnect ok 12 - no files left ok All tests successful. Files=1, Tests=12, 3 wallclock secs ( 0.08 usr + 0.05 sys = 0.13 CPU) Result: PASS Show quoted text
> > regarding 80, done. >
Thanks. Show quoted text
> regarding 71, can you explain why that would be needed? >
Please have a look my cpan-testers report #5600059. Citing that partly as follows: # Failed test 'for all ext' # at t/71_csv-ext.t line 47. # Structures begin differing at: # $got->[0] = 'csv' # $expected->[0] = 'testaa' # Failed test 'for all ext' # at t/71_csv-ext.t line 58. # Structures begin differing at: # $got->[0] = 'foo' # $expected->[0] = 'testaa' DBD::CSV::db do failed: This means that "s/^[^.]+\.// for @tbl;" doesn't work as we expected. Best regards, Taro Nishino