Add further tests for sqlite3_declare_vtab().

FossilOrigin-Name: f3c4433f6b33087494c8d38ff9dbb008a1bd30b424ca9aaa51c1956d75a86249
This commit is contained in:
dan 2024-03-25 20:00:40 +00:00
parent 1872f8d844
commit ca3b9096c4
3 changed files with 63 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Simplifications\sto\sthe\ssqlite3_declare_vtab()\simplementation.\s\sChanges\nsome\sconditionals\sinto\sassert()\sstatements,\sfor\scoverage.
D 2024-03-25T19:31:03.875
C Add\sfurther\stests\sfor\ssqlite3_declare_vtab().
D 2024-03-25T20:00:40.445
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -1951,6 +1951,7 @@ F test/vtabH.test 2efb5a24b0bb50796b21eca23032cfb77abfa4b0c03938e38ce5897abac404
F test/vtabI.test 751b07636700dbdea328e4265b6077ccd6811a3f
F test/vtabJ.test a6aef49d558af90fae10565b29501f82a95781cb4f797f2d13e2d19f9b6bc77b
F test/vtabK.test 13293177528fada1235c0112db0d187d754af1355c5a39371abd365104e3afbf
F test/vtabL.test 040b9f782a3b41844f2a5c660e6a0bfd298492980c6b4e126d82113c9785cec3
F test/vtab_alter.test 736e66fb5ec7b4fee58229aa3ada2f27ec58bc58c00edae4836890c3784c6783
F test/vtab_err.test dcc8b7b9cb67522b3fe7a272c73856829dae4ab7fdb30399aea1b6981bda2b65
F test/vtab_shared.test 5253bff2355a9a3f014c15337da7e177ab0ef8ad
@ -2182,8 +2183,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 87be9580747b405c2c534beadb0f95cee0d4f34e0245f90e157a6b7ada38e092
R ad8aac9f3b06a2e42b637acda669767c
U drh
Z b1a7a78f1aa22406dcb910ac85bd2eff
P ff7b898a6f9cb9aecb51bd6b63e253b4b7486ac9367f59c3c0491d78cfb39993
R aae449702ba5a25d8e948527e6058f06
U dan
Z 4c63f0c0b8b71810a39e1da8a896d2df
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
ff7b898a6f9cb9aecb51bd6b63e253b4b7486ac9367f59c3c0491d78cfb39993
f3c4433f6b33087494c8d38ff9dbb008a1bd30b424ca9aaa51c1956d75a86249

55
test/vtabL.test Normal file
View File

@ -0,0 +1,55 @@
# 2024-03-26
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix vtabL
ifcapable !vtab {
finish_test
return
}
register_tcl_module db
proc vtab_command {method args} {
switch -- $method {
xConnect {
return $::create_table_sql
}
}
return {}
}
do_execsql_test 1.0 {
CREATE TABLE t1(a, b);
}
foreach {tn cts} {
1 {SELECT 123}
2 {SELECT 123, 456}
3 {INSERT INTO t1 VALUES(5, 6)}
4 {CREATE INDEX i1 ON t1(a)}
5 {CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN SELECT 1; END;}
6 {DROP TABLE nosuchtable}
7 {DROP TABLE x1}
8 {DROP TABLE t1}
} {
set ::create_table_sql $cts
do_catchsql_test 1.$tn {
CREATE VIRTUAL TABLE x1 USING tcl(vtab_command);
} {1 {vtable constructor failed: x1}}
}
finish_test