[svn:DBD-Pg] r12629 - DBD-Pg/trunk/t

[email protected]
Newsgroups gmane.comp.db.postgresql.dbdpg.cvs
Message-ID <[email protected]>
Author: turnstep
Date: Mon Mar 23 18:12:02 2009
New Revision: 12629

Modified:
   DBD-Pg/trunk/t/03dbmethod.t

Log:
Remove temporary filenames from lo_import and lo_export.


Modified: DBD-Pg/trunk/t/03dbmethod.t
==============================================================================
--- DBD-Pg/trunk/t/03dbmethod.t	(original)
+++ DBD-Pg/trunk/t/03dbmethod.t	Mon Mar 23 18:12:02 2009
@@ -1387,6 +1387,7 @@
 	my $handle = $dbh->pg_lo_import($filename);
 	my $objid = $handle;
 	ok ($handle, $t);
+	unlink $filename;
 
 	$t='DB handle method "pg_lo_import" inserts correct data';
 	$SQL = "SELECT data FROM pg_largeobject where loid = $handle";
@@ -1413,6 +1414,7 @@
 	is ($result, 7, $t);
 	is ($data, "abc\ndef", $t);
 	close $fh or warn 'Could not close tempfile';
+	unlink $filename;
 }
 
 ## Same pg_lo_* tests, but with AutoCommit on
@@ -1546,6 +1548,7 @@
 	$info = $sth->fetchall_arrayref()->[0][0];
 	is_deeply ($info, "abc\ndef", $t);
 
+	unlink $filename;
 	$dbh->{AutoCommit} = 1;
 
 	my $objid = $handle;
@@ -1559,6 +1562,7 @@
 	is ($result, 7, $t);
 	is ($data, "abc\ndef", $t);
 	close $fh or warn 'Could not close tempfile';
+	unlink $filename;
 }
 $dbh->{AutoCommit} = 0;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.