mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-07-07 12:35:00 +00:00
testing: Add few TCL tests for vector extensions
This commit is contained in:
parent
ee05ad172b
commit
b9c89e79c2
2 changed files with 19 additions and 1 deletions
6
Makefile
6
Makefile
|
@ -62,7 +62,7 @@ limbo-wasm:
|
|||
cargo build --package limbo-wasm --target wasm32-wasi
|
||||
.PHONY: limbo-wasm
|
||||
|
||||
test: limbo test-compat test-sqlite3 test-shell test-extensions
|
||||
test: limbo test-compat test-vector test-sqlite3 test-shell test-extensions
|
||||
.PHONY: test
|
||||
|
||||
test-extensions: limbo
|
||||
|
@ -78,6 +78,10 @@ test-compat:
|
|||
SQLITE_EXEC=$(SQLITE_EXEC) ./testing/all.test
|
||||
.PHONY: test-compat
|
||||
|
||||
test-vector:
|
||||
SQLITE_EXEC=$(SQLITE_EXEC) ./testing/vector.test
|
||||
.PHONY: test-vector
|
||||
|
||||
test-sqlite3: limbo-c
|
||||
LIBS="$(SQLITE_LIB)" HEADERS="$(SQLITE_LIB_HEADERS)" make -C sqlite3/tests test
|
||||
.PHONY: test-sqlite3
|
||||
|
|
14
testing/vector.test
Executable file
14
testing/vector.test
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env tclsh
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
do_execsql_test vector-functions-valid {
|
||||
SELECT vector_extract(vector('[]'));
|
||||
SELECT vector_extract(vector(' [ 1 , 2 , 3 ] '));
|
||||
SELECT vector_extract(vector('[-1000000000000000000]'));
|
||||
} {
|
||||
{[]}
|
||||
{[1,2,3]}
|
||||
{[-1000000000000000000]}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue