mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-24 14:17:58 +03:00
Test cases for sqlite3_vtab_rhs_value() based on the qpvtab extension.
FossilOrigin-Name: 577d3d66558368c34acab8a9e552957cf3fa054c348f1383a9121de6e8b281b7
This commit is contained in:
@@ -291,7 +291,7 @@ static void qpvtabStrAppendValue(
|
||||
sqlite3_str_appendf(pStr, "%lld", sqlite3_value_int64(pVal));
|
||||
break;
|
||||
case SQLITE_FLOAT:
|
||||
sqlite3_str_appendf(pStr, "%f", sqlite3_value_double(pVal));
|
||||
sqlite3_str_appendf(pStr, "%!f", sqlite3_value_double(pVal));
|
||||
break;
|
||||
case SQLITE_TEXT: {
|
||||
int i;
|
||||
|
||||
13
manifest
13
manifest
@@ -1,5 +1,5 @@
|
||||
C Enhancements\sto\sthe\sqpvtab\svirtual\stable\sto\smake\sit\smore\suseful\sfor\stesting\nand\sverification\sof\svirtual\stable\sinterfaces.
|
||||
D 2022-01-20T18:27:54.219
|
||||
C Test\scases\sfor\ssqlite3_vtab_rhs_value()\sbased\son\sthe\sqpvtab\sextension.
|
||||
D 2022-01-20T19:00:48.033
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -316,7 +316,7 @@ F ext/misc/noop.c 81efe4cad9ec740e64388b14281cb983e6e2c223fed43eb77ab3e34946e0c1
|
||||
F ext/misc/normalize.c bd84355c118e297522aba74de34a4fd286fc775524e0499b14473918d09ea61f
|
||||
F ext/misc/percentile.c b9086e223d583bdaf8cb73c98a6539d501a2fc4282654adbfea576453d82e691
|
||||
F ext/misc/prefixes.c 0f4f8cff5aebc00a7e3ac4021fd59cfe1a8e17c800ceaf592859ecb9cbc38196
|
||||
F ext/misc/qpvtab.c 38f0753b264cb206574c720eb8a118b0d6b7be077aaefd3229711de7d6a65dee
|
||||
F ext/misc/qpvtab.c 69667dfc5c0417c1d2352e2cf0f3abdfd65919a423a07083952e27f3a30bf717
|
||||
F ext/misc/regexp.c b267fd05ff8d38b22f4c2809d7b7a2c61d522e9faf2feb928dbb9662e4a3a386
|
||||
F ext/misc/remember.c add730f0f7e7436cd15ea3fd6a90fd83c3f706ab44169f7f048438b7d6baa69c
|
||||
F ext/misc/rot13.c 51ac5f51e9d5fd811db58a9c23c628ad5f333c173f1fc53c8491a3603d38556c
|
||||
@@ -1725,6 +1725,7 @@ F test/vtab_alter.test 736e66fb5ec7b4fee58229aa3ada2f27ec58bc58c00edae4836890c37
|
||||
F test/vtab_err.test dcc8b7b9cb67522b3fe7a272c73856829dae4ab7fdb30399aea1b6981bda2b65
|
||||
F test/vtab_shared.test 5253bff2355a9a3f014c15337da7e177ab0ef8ad
|
||||
F test/vtabdrop.test 65d4cf6722972e5499bdaf0c0d70ee3b8133944a4e4bc31862563f32a7edca12
|
||||
F test/vtabrhs1.test 5205e3f662c35f75101520f882bf7d6abe0f5126f05b775ad2cbb13c9da1172f
|
||||
F test/wal.test b7cc6984709f54afbf8441747ced1f646af120bf0c1b1d847bfa39306fbea089
|
||||
F test/wal2.test 31f6e2c404b9f2cdf9ca19b105a1742fdc19653c2c936da39e3658c617524046
|
||||
F test/wal3.test 2a93004bc0fb2b5c29888964024695bade278ab2
|
||||
@@ -1939,8 +1940,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 0873c76b9b96b66fa9d13ddc8bca126d575ea3352349c7fd648f0c2f75d770f5
|
||||
R d96d8f6f20ceef7302e199b2da925b92
|
||||
P 850efc4cf3d136fba9173c380e9417b43bb93c050f7eeb85d07fd39a4b1cc6aa
|
||||
R 3ecb930f6cfc60c294bf42c3052a9c99
|
||||
U drh
|
||||
Z 918c35408c3bb1880315f1de3ce596eb
|
||||
Z e518270449fd92d31e3cdea40bbeb849
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
@@ -1 +1 @@
|
||||
850efc4cf3d136fba9173c380e9417b43bb93c050f7eeb85d07fd39a4b1cc6aa
|
||||
577d3d66558368c34acab8a9e552957cf3fa054c348f1383a9121de6e8b281b7
|
||||
51
test/vtabrhs1.test
Normal file
51
test/vtabrhs1.test
Normal file
@@ -0,0 +1,51 @@
|
||||
# 2022-01-20
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# This file implements tests for sqlite3_vtab_rhs_value() interface.
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
set testprefix vtabrhs1
|
||||
|
||||
ifcapable !vtab {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
load_static_extension db qpvtab
|
||||
|
||||
do_execsql_test 1.1 {
|
||||
SELECT rhs FROM qpvtab
|
||||
WHERE cn='a'
|
||||
AND a=12345
|
||||
} {12345}
|
||||
do_execsql_test 1.2 {
|
||||
SELECT rhs FROM qpvtab
|
||||
WHERE cn='a'
|
||||
AND a<>4.5
|
||||
} {4.5}
|
||||
do_execsql_test 1.3 {
|
||||
SELECT rhs FROM qpvtab
|
||||
WHERE cn='a'
|
||||
AND 'quokka' < a
|
||||
} {'quokka'}
|
||||
do_execsql_test 1.4 {
|
||||
SELECT rhs FROM qpvtab
|
||||
WHERE cn='a'
|
||||
AND a IS NULL
|
||||
} {{}}
|
||||
do_execsql_test 1.5 {
|
||||
SELECT rhs FROM qpvtab
|
||||
WHERE cn='a'
|
||||
AND a GLOB x'0123'
|
||||
} {x'0123'}
|
||||
|
||||
finish_test
|
||||
Reference in New Issue
Block a user