Add extra tests to this branch.

FossilOrigin-Name: b0e3b88a792623f7761586d8bfac058ddf939f49944ff0c4376627ff920895db
This commit is contained in:
dan
2017-08-10 19:10:23 +00:00
parent 4dd176eaab
commit 09fc79bd6f
4 changed files with 49 additions and 9 deletions
+16
View File
@@ -125,4 +125,20 @@ do_catchsql_test 4.1 {
);
} {0 {}}
do_catchsql_test 4.2 {
DROP TABLE IF EXISTS t5;
CREATE VIRTUAL TABLE temp.t5 USING csv_wr(
data=
'1,2,3,4
5,6,7,8
9,10,11,12
13,14,15,16',
columns=4,
schema=
'CREATE TABLE t3(a,b,c,d) WITHOUT ROWID',
testflags=1
);
} {0 {vtable constructor failed: t5}}
finish_test
+24
View File
@@ -99,4 +99,28 @@ do_test 162 {
set res
} {vtabJ(1) this vtabJ(3) {a test} vtabJ(5) 55}
# Try to trick the module into updating the same variable twice for a
# single UPDATE statement.
#
do_execsql_test 171 {
INSERT INTO tclvar(fullname, value) VALUES('xx', 'a');
SELECT name, value FROM tclvar where name = 'xx';
} {xx a}
do_execsql_test 172 {
UPDATE tclvar SET value = value || 't'
WHERE name = 'xx' OR name = 'x'||'x';
SELECT name, value FROM tclvar where name = 'xx';
} {xx at}
do_execsql_test 173 {
UPDATE tclvar SET value = value || 't'
WHERE name = 'xx' OR name BETWEEN 'xx' AND 'xx';
SELECT name, value FROM tclvar where name = 'xx';
} {xx att}
do_execsql_test 181 {
DELETE FROM tclvar WHERE name BETWEEN 'xx' AND 'xx' OR name='xx';
SELECT name, value FROM tclvar where name = 'xx';
} {}
finish_test