Author: timbo
Date: Thu Nov 22 06:01:43 2007
New Revision: 10293
Modified:
dbi/trunk/Changes
dbi/trunk/DBI.pm
dbi/trunk/DBI.xs
dbi/trunk/t/10examp.t
Log:
Don't write files to /tmp else concurrent tests may fail.
Bump version to 1.602
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Thu Nov 22 06:01:43 2007
@@ -47,6 +47,7 @@
Expanded DBI::DBD docs for driver authors thanks to Martin Evans.
Improvements to t/80proxy.t test script.
Improvements to t/85gofer.t test script thanks to Stig.
+ Improvements to t/10examp.t test script thanks to David Cantrell.
Gofer changes:
track_recent now also keeps track of N most recent errors.
Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm (original)
+++ dbi/trunk/DBI.pm Thu Nov 22 06:01:43 2007
@@ -9,7 +9,7 @@
require 5.006_00;
BEGIN {
-$DBI::VERSION = "1.601"; # ==> ALSO update the version in the pod text below!
+$DBI::VERSION = "1.602"; # ==> ALSO update the version in the pod text below!
}
=head1 NAME
@@ -121,7 +121,7 @@
=head2 NOTES
-This is the DBI specification that corresponds to the DBI version 1.601
+This is the DBI specification that corresponds to the DBI version 1.602
($Revision$).
The DBI is evolving at a steady pace, so it's good to check that
Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs (original)
+++ dbi/trunk/DBI.xs Thu Nov 22 06:01:43 2007
@@ -468,7 +468,7 @@
if ( DBIc_has(imp_xxh, DBIcf_HandleSetErr)
&& (hook_svp = hv_fetch((HV*)SvRV(h),"HandleSetErr",12,0))
&& hook_svp
- && (SvGMAGICAL(*hook_svp) && mg_get(*hook_svp), SvOK(*hook_svp))
+ && ((SvGMAGICAL(*hook_svp) && mg_get(*hook_svp)), SvOK(*hook_svp))
) {
dSP;
IV items;
Modified: dbi/trunk/t/10examp.t
==============================================================================
--- dbi/trunk/t/10examp.t (original)
+++ dbi/trunk/t/10examp.t Thu Nov 22 06:01:43 2007
@@ -421,27 +421,17 @@
ok($sth->execute('../'));
}
- my $dump_dir = ($ENV{TMP} ||
- $ENV{TEMP} ||
- $ENV{TMPDIR} ||
- $ENV{'SYS$SCRATCH'} ||
- '/tmp');
- my $dump_file = ($haveFileSpec) ?
- File::Spec->catfile($dump_dir,
'dumpcsr.tst')
- :
- "$dump_dir/dumpcsr.tst";
- #($dump_file) = ($dump_file =~ m/^(.*)$/); # untaint
-
+ my $dump_file = 'dumpcsr.tst';
SKIP: {
- skip "# dump_results test skipped: unable to open $dump_file:
$!\n", 2 unless (open(DUMP_RESULTS, ">$dump_file"));
- ok($sth->dump_results("10", "\n", ",\t", \*DUMP_RESULTS));
- close(DUMP_RESULTS);
- ok(-s $dump_file > 0);
+ skip "# dump_results test skipped: unable to open $dump_file:
$!\n", 4
+ unless open(DUMP_RESULTS, ">$dump_file");
+ ok($sth->dump_results("10", "\n", ",\t", \*DUMP_RESULTS));
+ close(DUMP_RESULTS) or warn "close $dump_file: $!";
+ ok(-s $dump_file > 0);
+ is( unlink( $dump_file ), 1, "Remove $dump_file" );
+ ok( !-e $dump_file, "Actually gone" );
}
- is( unlink( $dump_file ), 1, "Remove $dump_file" );
- ok( !-e $dump_file, "Actually gone" );
-
}
print "table_info\n";