summaryrefslogtreecommitdiff
path: root/test/quota.test
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2012-09-20 18:34:38 -0400
committerHans-Christoph Steiner <hans@eds.org>2012-09-20 18:34:38 -0400
commit487e15dc239ccdb3344d1c99ce120e872bab4a74 (patch)
treec986d492f6092ca7b4401d91515f74daed17fae2 /test/quota.test
parent7bb481fda9ecb134804b49c2ce77ca28f7eea583 (diff)
Imported Upstream version 2.0.6
Diffstat (limited to 'test/quota.test')
-rw-r--r--test/quota.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/quota.test b/test/quota.test
index 49b403f..ec89086 100644
--- a/test/quota.test
+++ b/test/quota.test
@@ -14,6 +14,8 @@ set testdir [file dirname $argv0]
source $testdir/tester.tcl
source $testdir/malloc_common.tcl
+unset -nocomplain defaultVfs
+set defaultVfs [file_control_vfsname db]
db close
do_test quota-1.1 { sqlite3_quota_initialize nosuchvfs 1 } {SQLITE_ERROR}
@@ -48,6 +50,7 @@ do_test quota-1.8 { sqlite3_quota_shutdown } {SQLITE_OK}
#
sqlite3_quota_initialize "" 1
+unset -nocomplain quota_request_ok
proc quota_check {filename limitvar size} {
upvar $limitvar limit
@@ -73,6 +76,9 @@ do_test quota-2.1.2 {
}
set ::quota
} {}
+do_test quota-2.1.2.1 {
+ file_control_vfsname db
+} quota/$defaultVfs
do_test quota-2.1.3 { file size test.db } {4096}
do_test quota-2.1.4 {
catchsql { INSERT INTO t1 VALUES(3, randomblob(1100)) }
@@ -215,7 +221,7 @@ do_test quota-3.3.1 {
execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2a
execsql { INSERT INTO t1 VALUES(randomblob(500), randomblob(500)) } db2b
set ::quota
-} [list [file join [pwd] test.db] 5120]
+} [list [file join [get_pwd] test.db] 5120]
do_test quota-3.2.X {
foreach db {db1a db2a db2b db1b} { catch { $db close } }