Permalink
Browse files

Fixed tests in 10_db_handle.t to behave on Cygwin

  • Loading branch information...
1 parent 8f5a513 commit 8e46527a65f32f3028746cc5157f708129a50ea0 @robkinyon robkinyon committed Jan 15, 2005
Showing with 16 additions and 4 deletions.
  1. +3 −0 Changes
  2. +1 −1 VERSION
  3. +12 −3 t/10_db_handle.t
View
@@ -1,5 +1,8 @@
Revision history for Perl extension DBD::Mock.
+0.20 Fri Jan 14 2005
+ - Modified a set of tests in t/10_db_handle.t to pass on Cygwin
+
0.19 Fri Jan 7 2005
- changed the VERSION in lib/DBD/Mock.pm to be 1.23, allow me to explain...
View
@@ -1 +1 @@
-$VERSION = '0.19';
+$VERSION = '0.20';
View
@@ -66,8 +66,17 @@ BEGIN {
# test setting them during connect
-{
- my $trace_log = 'tmp_dbi_trace.log';
+SKIP: {
+ eval {
+ require File::Temp;
+ File::Temp->import( 'tempfile' );
+ };
+ skip "Cannot load File::Temp", 7 if $@;
+
+ (undef, my $trace_log) = do {
+ local $^W; # Disable warning about unsafe tempfile() call
+ tempfile( 'dbd_mock_test_XXXX', OPEN => 0 );
+ };
open STDERR, "> $trace_log";
ok(-f $trace_log, '... the trace log file has been created');
@@ -90,4 +99,4 @@ BEGIN {
ok(!-e $trace_log, "... the trace log file is actually gone" );
$dbh->disconnect();
-}
+}

0 comments on commit 8e46527

Please sign in to comment.