| Index: third_party/sqlite/src/test/sync.test
|
| diff --git a/third_party/sqlite/src/test/sync.test b/third_party/sqlite/src/test/sync.test
|
| index 98aa7731e7ddcbfe949a93ed369d012a58bc2455..14252b5c08af33a59917bc79269cced40ed2aacb 100644
|
| --- a/third_party/sqlite/src/test/sync.test
|
| +++ b/third_party/sqlite/src/test/sync.test
|
| @@ -19,32 +19,38 @@ set testdir [file dirname $argv0]
|
| source $testdir/tester.tcl
|
|
|
| #
|
| -# These tests are only applicable on unix when pager pragma are
|
| +# These tests are only applicable when pager pragma are
|
| # enabled. Also, since every test uses an ATTACHed database, they
|
| # are only run when ATTACH is enabled.
|
| #
|
| -if {$::tcl_platform(platform)!="unix"} {
|
| - finish_test
|
| - return
|
| -}
|
| ifcapable !pager_pragmas||!attach {
|
| finish_test
|
| return
|
| }
|
|
|
| +set sqlite_sync_count 0
|
| +proc cond_incr_sync_count {adj} {
|
| + global sqlite_sync_count
|
| + if {$::tcl_platform(platform) == "windows"} {
|
| + incr sqlite_sync_count $adj
|
| + } {
|
| + ifcapable !dirsync {
|
| + incr sqlite_sync_count $adj
|
| + }
|
| + }
|
| +}
|
| +
|
| do_test sync-1.1 {
|
| set sqlite_sync_count 0
|
| - file delete -force test2.db
|
| - file delete -force test2.db-journal
|
| + forcedelete test2.db
|
| + forcedelete test2.db-journal
|
| execsql {
|
| PRAGMA fullfsync=OFF;
|
| CREATE TABLE t1(a,b);
|
| ATTACH DATABASE 'test2.db' AS db2;
|
| CREATE TABLE db2.t2(x,y);
|
| }
|
| - ifcapable !dirsync {
|
| - incr sqlite_sync_count 2
|
| - }
|
| + cond_incr_sync_count 2
|
| set sqlite_sync_count
|
| } 8
|
| ifcapable pager_pragmas {
|
| @@ -58,9 +64,7 @@ ifcapable pager_pragmas {
|
| INSERT INTO t2 VALUES(3,4);
|
| COMMIT;
|
| }
|
| - ifcapable !dirsync {
|
| - incr sqlite_sync_count 3
|
| - }
|
| + cond_incr_sync_count 3
|
| set sqlite_sync_count
|
| } 8
|
| }
|
| @@ -74,9 +78,7 @@ do_test sync-1.3 {
|
| INSERT INTO t2 VALUES(5,6);
|
| COMMIT;
|
| }
|
| - ifcapable !dirsync {
|
| - incr sqlite_sync_count 3
|
| - }
|
| + cond_incr_sync_count 3
|
| set sqlite_sync_count
|
| } 10
|
| ifcapable pager_pragmas {
|
|
|