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 #***********************************************************************
12 # $Id: filectrl.test,v 1.2 2008/11/21 00:10:35 aswift Exp $
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
18 do_test filectrl-1.1 {
21 do_test filectrl-1.2 {
22 db eval {CREATE TEMP TABLE x(y);}
25 do_test filectrl-1.3 {
30 do_test filectrl-1.4 {
32 file_control_lasterrno_test db
34 do_test filectrl-1.5 {
36 sqlite3 db test_control_lockproxy.db
37 file_control_lockproxy_test db [get_pwd]
39 do_test filectrl-1.6 {
41 set fn [file_control_tempfilename db]
45 forcedelete .test_control_lockproxy.db-conch test.proxy
46 forcedelete test.db test2.db
48 if {$tcl_platform(platform)=="windows"} {
49 do_test filectrl-2.1 {
51 set size [file size test2.db]
52 set handle [file_control_win32_get_handle db]
55 list $size $handle [expr {$handle != 0}]
56 } {/^0 \{0 [0-9A-Fa-f]+\} 1$/}
58 do_test filectrl-2.2 {
62 INSERT INTO t1 (x) VALUES(RANDOMBLOB(1048576));
64 set size [file size test2.db]
65 set handle [file_control_win32_get_handle db]
68 list $size $handle [expr {$handle != 0}]
69 } {/^1\d+ \{0 [0-9A-Fa-f]+\} 1$/}