aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/test/async3.test
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/test/async3.test
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/async3.test')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/test/async3.test73
1 files changed, 73 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/async3.test b/libraries/sqlite/unix/sqlite-3.5.1/test/async3.test
new file mode 100644
index 0000000..0434a28
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/test/async3.test
@@ -0,0 +1,73 @@
1# 2007 September 5
2#
3# The author disclaims copyright to this source code. In place of
4# a legal notice, here is a blessing:
5#
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.
9#
10#***********************************************************************
11#
12# The focus of this file is testing the code in test_async.c.
13# Specifically, it tests that the xFullPathname() method of
14# of the asynchronous vfs works correctly.
15#
16# $Id: async3.test,v 1.2 2007/09/05 16:54:41 danielk1977 Exp $
17
18set testdir [file dirname $argv0]
19source $testdir/tester.tcl
20
21if { [info commands sqlite3async_enable]=="" } {
22 # The async logic is not built into this system
23 puts "Skipping async3 tests: not compiled with required features"
24 finish_test
25 return
26}
27
28db close
29sqlite3async_enable 1
30sqlite3async_start
31
32set paths {
33 chocolate/banana/vanilla/file.db
34 chocolate//banana/vanilla/file.db
35 chocolate/./banana//vanilla/file.db
36 chocolate/banana/./vanilla/file.db
37 chocolate/banana/../banana/vanilla/file.db
38 chocolate/banana/./vanilla/extra_bit/../file.db
39}
40
41do_test async3-1.0 {
42 file mkdir [file join chocolate banana vanilla]
43 file delete -force chocolate/banana/vanilla/file.db
44 file delete -force chocolate/banana/vanilla/file.db-journal
45} {}
46
47do_test async3-1.1 {
48 sqlite3 db chocolate/banana/vanilla/file.db
49 execsql {
50 CREATE TABLE abc(a, b, c);
51 BEGIN;
52 INSERT INTO abc VALUES(1, 2, 3);
53 }
54} {}
55
56set N 2
57foreach p $paths {
58 sqlite3 db2 $p
59 do_test async3-1.$N.1 {
60 execsql {SELECT * FROM abc} db2
61 } {}
62 do_test async3-1.$N.2 {
63 catchsql {INSERT INTO abc VALUES(4, 5, 6)} db2
64 } {1 {database is locked}}
65 db2 close
66 incr N
67}
68
69db close
70sqlite3async_halt idle
71sqlite3async_wait
72sqlite3async_enable 0
73finish_test