1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-24 22:22:08 +03:00

Add the experimental SQLITE_FCNTL_WIN32_GET_HANDLE file control.

FossilOrigin-Name: b6ddabe1818c36007c476a31e2e35755630a5f14
This commit is contained in:
mistachkin
2016-05-03 19:36:54 +00:00
parent 799730bf81
commit 1b361ff381
6 changed files with 86 additions and 12 deletions

View File

@ -43,4 +43,30 @@ do_test filectrl-1.6 {
} {/etilqs_/}
db close
forcedelete .test_control_lockproxy.db-conch test.proxy
forcedelete test.db test2.db
if {$tcl_platform(platform)=="windows"} {
do_test filectrl-2.1 {
sqlite3 db test2.db
set size [file size test2.db]
set handle [file_control_win32_get_handle db]
db close
forcedelete test2.db
list $size $handle [expr {$handle != 0}]
} {/^0 \{0 \d+\} 1$/}
do_test filectrl-2.2 {
sqlite3 db test2.db
execsql {
CREATE TABLE t1(x);
INSERT INTO t1 (x) VALUES(RANDOMBLOB(1048576));
}
set size [file size test2.db]
set handle [file_control_win32_get_handle db]
db close
forcedelete test2.db
list $size $handle [expr {$handle != 0}]
} {/^1\d+ \{0 \d+\} 1$/}
}
finish_test