3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
11 # This file implements regression tests for SQLite library.
14 if {$tcl_platform(platform)!="windows"} return
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
18 set testprefix win32nolock
20 do_test win32nolock-1.0 {
23 CREATE TABLE t1(a, b);
25 INSERT INTO t1 VALUES(1, 2);
29 do_test win32nolock-1.1 {
31 catchsql { SELECT * FROM t1 }
36 do_test win32nolock-1.2 {
37 sqlite3 db test.db -vfs win32-none
38 sqlite3 db2 test.db -vfs win32-none
39 execsql { PRAGMA mmap_size = 0 } db2
42 INSERT INTO t1 VALUES(3, 4);
46 do_test win32nolock-1.3 {
47 execsql { SELECT * FROM t1 }
50 do_test win32nolock-1.4 {
51 execsql { SELECT * FROM t1; } db2
54 do_test win32nolock-1.5 {
61 do_test win32nolock-1.6 {
63 execsql {SELECT * FROM t1} db2
66 ifcapable memorymanage {
67 do_test win32nolock-1.7 {
68 sqlite3_release_memory 1000000
69 execsql {SELECT * FROM t1} db2
73 do_test win32nolock-1.8 {
78 do_test win32nolock-1.9.1 {
81 list [catchsql { BEGIN EXCLUSIVE; } db] \
82 [catchsql { BEGIN EXCLUSIVE; } db2]
83 } {{0 {}} {1 {database is locked}}}
85 do_test win32nolock-1.9.2 {
90 do_test win32nolock-1.10.1 {
91 sqlite3 db test.db -vfs win32-none
93 list [catchsql { BEGIN EXCLUSIVE; } db] \
94 [catchsql { BEGIN EXCLUSIVE; } db2]
97 do_test win32nolock-1.10.2 {
102 do_test win32nolock-1.11.1 {
104 sqlite3 db2 test.db -vfs win32-none
105 list [catchsql { BEGIN EXCLUSIVE; } db] \
106 [catchsql { BEGIN EXCLUSIVE; } db2]
109 do_test win32nolock-1.11.2 {
114 do_test win32nolock-1.12.1 {
115 sqlite3 db test.db -vfs win32-none
116 sqlite3 db2 test.db -vfs win32-none
117 list [catchsql { BEGIN EXCLUSIVE; } db] \
118 [catchsql { BEGIN EXCLUSIVE; } db2]
121 do_test win32nolock-1.12.2 {