Re: DBI-1.58 test failure on Windows



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);


Relevant Pages

  • Re: DBI-1.58 test failure on Windows
    ... fail on plain ActivePerl 5.8.4 on Windows ... not ok 14 - Program matches ... Running "perl -Mblib t/41prof_dump.t" is fine, though, which explains why "nmake test" works, given also that the Makefile has ...
    (perl.dbi.users)
  • Re: GUI and Rapid Application Development?
    ... Most simple applications that I dealt with did not need the use of API ... I imagine Perl is faster, ... my Perl scripts are more compact ... Chirag> in Windows that could run on Windows 98 through 2003. ...
    (comp.os.linux.misc)
  • Re: ping Purl Gurl? Beginner Level Perl
    ... Purl Gurl wrote: ... If you are to learn Perl, ... Windows machines is good motivation for using Win. ...
    (alt.usage.english)
  • Re: My Regexp XML Parser -> Structured Perl Data, Cut & Paste Version, No Modules (Vol I)
    ... On Windows NT and later, subprocesses are now started via ``cmd /x/d/c'' ... Perl for ISAPI would sometimes close a filehandle twice. ...
    (comp.lang.perl.misc)
  • Re: Unix commands
    ... ==> writing the program in Perl, ... ==> program that had to be ported to Windows. ... After installing a Unix toolkit the script ... And every other common Unix tool. ...
    (comp.lang.perl.misc)