Tests cases automatically remove many of their temporary files. (CVS 3463)

FossilOrigin-Name: eef0ec0d7ae0743d29454567f539e46ad2d5008e
This commit is contained in:
drh
2006-10-04 11:55:49 +00:00
parent b1b6d4a929
commit d9910fe529
6 changed files with 26 additions and 15 deletions
+4 -2
View File
@@ -14,7 +14,7 @@
# special feature is used to see what happens in the library if a malloc
# were to really fail due to an out-of-memory situation.
#
# $Id: malloc.test,v 1.34 2006/07/11 12:40:25 drh Exp $
# $Id: malloc.test,v 1.35 2006/10/04 11:55:50 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -443,7 +443,9 @@ do_malloc_test 17 -tclbody {
set STMT 0
# open database using sqlite3_open16()
set DB2 [sqlite3_open16 test.db -unused]
set filename [encoding convertto unicode test.db]
append filename "\x00\x00"
set DB2 [sqlite3_open16 $filename -unused]
if {0==$DB2} {
error "out of memory"
}
+7 -1
View File
@@ -11,7 +11,7 @@
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.68 2006/09/15 12:29:16 drh Exp $
# $Id: tester.tcl,v 1.69 2006/10/04 11:55:50 drh Exp $
# Make sure tclsqlite3 was compiled correctly. Abort now with an
# error message if not.
@@ -172,6 +172,12 @@ proc finalize_testing {} {
puts "$sqlite_open_file_count files were left open"
incr nErr
}
foreach f [glob -nocomplain test.db-*-journal] {
file delete -force $f
}
foreach f [glob -nocomplain test.db-mj*] {
file delete -force $f
}
exit [expr {$nErr>0}]
}
+2
View File
@@ -195,4 +195,6 @@ do_test trigger4-7.2 {
integrity_check trigger4-99.9
file delete -force trigtest.db trigtest.db-journal
finish_test
+3 -2
View File
@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the VACUUM statement.
#
# $Id: vacuum.test,v 1.37 2006/01/11 14:09:32 danielk1977 Exp $
# $Id: vacuum.test,v 1.38 2006/10/04 11:55:50 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -39,7 +39,7 @@ proc cksum {{db db}} {
foreach prag {default_cache_size} {
append txt $prag-[$db eval "PRAGMA $prag"]\n
}
if 1 {
if 0 {
global fcnt
set fd [open dump$fcnt.txt w]
puts -nonewline $fd $txt
@@ -354,5 +354,6 @@ ifcapable {autoinc} {
} $::cksum
}
file delete -force {a'z.db}
finish_test