On Wed, Sep 08, 2004 at 10:54:28AM -0400, Jeff Urlwin wrote:
> Tim,
>
> Attached is a minor patch to fix skipping tests on Win32.
Could you rework that using File::Spec?
Tim.
> It would be nice if Cygwin users could validate this on their platform...
>
> Regards,
>
> Jeff
>
>
>
> Index: t/01basics.t
> ===================================================================
> --- t/01basics.t (revision 452)
> +++ t/01basics.t (working copy)
> @@ -147,10 +147,12 @@
> ## testing dbi_debug
>
> cmp_ok($DBI::dbi_debug, '==', 0, "... DBI::dbi_debug's initial state is
> 0");
> +my $null = "/dev/null";
> +$null = "nul" if ($^O eq "MSWin32");
>
> SKIP: {
> - skip "cannot find : /dev/null", 2 unless (-e "/dev/null");
> - DBI->trace(42,"/dev/null");
> + skip "cannot find : $null", 2 unless ($^O eq "MSWin32" || -e $null);
>
> + DBI->trace(42,$null);
> cmp_ok($DBI::dbi_debug, '==', 42, "... DBI::dbi_debug is 42");
> DBI->trace(0, undef);
> cmp_ok($DBI::dbi_debug, '==', 0, "... DBI::dbi_debug is 0");