Author: jurl
Date: Fri Sep 10 04:43:03 2004
New Revision: 456
Modified:
dbi/trunk/t/01basics.t
Log:
Fixed to use File::Spec for devnull and deal with -e
doesn't successfully test for existance under win32.
Modified: dbi/trunk/t/01basics.t
==============================================================================
--- dbi/trunk/t/01basics.t (original)
+++ dbi/trunk/t/01basics.t Fri Sep 10 04:43:03 2004
@@ -3,6 +3,7 @@
use strict;
use Test::More tests => 110;
+use File::Spec;
## ----------------------------------------------------------------------------
## 01basic.t - test of some basic DBI functions
@@ -147,10 +148,11 @@
## testing dbi_debug
cmp_ok($DBI::dbi_debug, '==', 0, "... DBI::dbi_debug's initial state is 0");
+my $null = File::Spec::->devnull();
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");