aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/test/attachmalloc.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/attachmalloc.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/attachmalloc.test')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/test/attachmalloc.test48
1 files changed, 48 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/attachmalloc.test b/libraries/sqlite/unix/sqlite-3.5.1/test/attachmalloc.test
new file mode 100644
index 0000000..38778ca
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/test/attachmalloc.test
@@ -0,0 +1,48 @@
1# 2005 September 19
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# This file implements regression tests for SQLite library. The
12# focus of this script is testing the ATTACH statement and
13# specifically out-of-memory conditions within that command.
14#
15# $Id: attachmalloc.test,v 1.6 2007/10/03 08:46:45 danielk1977 Exp $
16#
17
18set testdir [file dirname $argv0]
19source $testdir/tester.tcl
20
21ifcapable !memdebug {
22 finish_test
23 return
24}
25
26source $testdir/malloc_common.tcl
27
28do_malloc_test attachmalloc-1 -tclprep {
29 db close
30 for {set i 2} {$i<=4} {incr i} {
31 file delete -force test$i.db
32 file delete -force test$i.db-journal
33 }
34} -tclbody {
35 if {[catch {sqlite3 db test.db}]} {
36 error "out of memory"
37 }
38 sqlite3_extended_result_codes db 1
39} -sqlbody {
40 ATTACH 'test2.db' AS two;
41 CREATE TABLE two.t1(x);
42 ATTACH 'test3.db' AS three;
43 CREATE TABLE three.t1(x);
44 ATTACH 'test4.db' AS four;
45 CREATE TABLE four.t1(x);
46}
47
48finish_test