mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Add tests and minor fixes to the xFindFunction method of virtual tables. (CVS 3323)
FossilOrigin-Name: 3c4233e074cb016e2422b2e8f867c99217e9b10e
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is creating and dropping virtual tables.
|
||||
#
|
||||
# $Id: vtab1.test,v 1.33 2006/06/24 11:51:35 danielk1977 Exp $
|
||||
# $Id: vtab1.test,v 1.34 2006/07/08 18:09:15 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -833,5 +833,29 @@ do_test vtab1.10-6 {
|
||||
xFilter {SELECT rowid, * FROM 'r'} \
|
||||
]
|
||||
|
||||
finish_test
|
||||
|
||||
# Testing the xFindFunction interface
|
||||
#
|
||||
do_test vtab1.11-1 {
|
||||
execsql {
|
||||
INSERT INTO r(a,b,c) VALUES(1,'?',99);
|
||||
INSERT INTO r(a,b,c) VALUES(2,3,99);
|
||||
SELECT a GLOB b FROM e
|
||||
}
|
||||
} {1 0}
|
||||
proc ::echo_glob_overload {a b} {
|
||||
return [list $b $a]
|
||||
}
|
||||
do_test vtab1.11-2 {
|
||||
execsql {
|
||||
SELECT a like b FROM e
|
||||
}
|
||||
} {0 0}
|
||||
do_test vtab1.11-3 {
|
||||
execsql {
|
||||
SELECT a glob b FROM e
|
||||
}
|
||||
} {{1 ?} {2 3}}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user