Re: DBI-1.58 test failure on Windows
- From: steve.hay@xxxxxxxxxxxx (Steve Hay)
- Date: Tue, 26 Jun 2007 14:25:05 +0100
Gabor Szabo wrote:
Hi,[...]
both
t\41prof_dump.t
t\zvg_41prof_dump.t
fail on plain ActivePerl 5.8.4 on Windows
# Failed test (t\41prof_dump.t at line 79)
not ok 14 - Program matches
# got: 't\\41prof_dump.t'
# expected: 't\41prof_dump.t'
Works fine for me (using bleadperl) when I just run "nmake test", but if I explicitly run "perl -Mblib t\41prof_dump.t" then it fails as above.
Running "perl -Mblib t/41prof_dump.t" is fine, though, which explains why "nmake test" works, given also that the Makefile has "TEST_FILES=t/*.t" rather than "TEST_FILES=t\*.t".
Attached patch fixes it, but it's arguably just hiding the real problem of having \\ where only \ was expected.
-- diff -ruN DBI-1.58.orig/t/41prof_dump.t DBI-1.58/t/41prof_dump.t
--- DBI-1.58.orig/t/41prof_dump.t 2007-06-15 22:49:16.000000000 +0100
+++ DBI-1.58/t/41prof_dump.t 2007-06-26 14:16:35.482433600 +0100
@@ -11,6 +11,7 @@
use DBI;
+use File::Spec::Functions qw(canonpath);
use Test::More;
BEGIN {
@@ -76,7 +77,7 @@
like( $prof[1], qr{^Path\s+=\s+\[\s+\]}, 'Found the Path');
ok( $prof[2] =~ m{^Program\s+=\s+(\S+)}, 'Found the Program');
-is( $1, $0, 'Program matches' );
+is( canonpath($1), canonpath($0), 'Program matches' );
# check that expected key is there
like(join('', @prof), qr/\+\s+1\s+\Q$sql\E/m);
- Follow-Ups:
- Re: DBI-1.58 test failure on Windows
- From: Tim Bunce
- Re: DBI-1.58 test failure on Windows
- References:
- DBI-1.58 test failure on Windows
- From: Gabor Szabo
- DBI-1.58 test failure on Windows
- Prev by Date: DBI-1.58 test failure on Windows
- Next by Date: Re: next version of DBD::ODBC including available unicode patch?
- Previous by thread: DBI-1.58 test failure on Windows
- Next by thread: Re: DBI-1.58 test failure on Windows
- Index(es):
Relevant Pages
|