mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Move the test (sqlite3_simulate_device) functionality out of the main code and into a test vfs. (CVS 4737)
FossilOrigin-Name: 17e7bd6c3f507ffc6b56f54ae8c70730e8246f39
This commit is contained in:
14
test/io.test
14
test/io.test
@ -13,11 +13,15 @@
|
||||
# IO traffic generated by SQLite (making sure SQLite is not writing out
|
||||
# more database pages than it has to, stuff like that).
|
||||
#
|
||||
# $Id: io.test,v 1.13 2007/11/27 23:11:45 drh Exp $
|
||||
# $Id: io.test,v 1.14 2008/01/22 11:50:13 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
db close
|
||||
sqlite3_simulate_device
|
||||
sqlite3 db test.db -vfs devsym
|
||||
|
||||
# Test summary:
|
||||
#
|
||||
# io-1.* - Test that quick-balance does not journal pages unnecessarily.
|
||||
@ -157,7 +161,7 @@ do_test io-2.4.1 {
|
||||
BEGIN;
|
||||
INSERT INTO abc VALUES(5, 6);
|
||||
}
|
||||
sqlite3 db2 test.db
|
||||
sqlite3 db2 test.db -vfs devsym
|
||||
execsql { SELECT * FROM abc } db2
|
||||
} {1 2 3 4}
|
||||
do_test io-2.4.2 {
|
||||
@ -296,7 +300,7 @@ do_test io-2.9.2 {
|
||||
execsql { ROLLBACK; }
|
||||
db close
|
||||
file delete -force test.db test.db-journal
|
||||
sqlite3 db test.db
|
||||
sqlite3 db test.db -vfs devsym
|
||||
execsql {
|
||||
PRAGMA auto_vacuum = OFF;
|
||||
PRAGMA page_size = 2048;
|
||||
@ -369,7 +373,7 @@ ifcapable pager_pragmas {
|
||||
do_test io-3.1 {
|
||||
db close
|
||||
file delete -force test.db test.db-journal
|
||||
sqlite3 db test.db
|
||||
sqlite3 db test.db -vfs devsym
|
||||
db eval {
|
||||
PRAGMA auto_vacuum=OFF;
|
||||
}
|
||||
@ -526,7 +530,7 @@ foreach {char sectorsize pgsize} {
|
||||
db close
|
||||
file delete -force test.db test.db-journal
|
||||
sqlite3_simulate_device -char $char -sectorsize $sectorsize
|
||||
sqlite3 db test.db
|
||||
sqlite3 db test.db -vfs devsym
|
||||
db eval {
|
||||
PRAGMA auto_vacuum=OFF;
|
||||
}
|
||||
|
Reference in New Issue
Block a user