mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Add very simple tcl tests for the lsm1 extension.
FossilOrigin-Name: 5e0a97930b08fff1c3a29f5c8b2962b856e3302209228c0e71b9f1a1bd2a4be3
This commit is contained in:
35
ext/lsm1/test/lsm1_common.tcl
Normal file
35
ext/lsm1/test/lsm1_common.tcl
Normal file
@ -0,0 +1,35 @@
|
||||
# 2014 Dec 19
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
|
||||
if {![info exists testdir]} {
|
||||
set testdir [file join [file dirname [info script]] .. .. .. test]
|
||||
}
|
||||
source $testdir/tester.tcl
|
||||
|
||||
# Check if the lsm1 extension has been compiled.
|
||||
set lsm1 lsm1.so
|
||||
if {[file exists [file join .. $lsm1]]} {
|
||||
proc return_if_no_lsm1 {} {}
|
||||
} else {
|
||||
proc return_if_no_lsm1 {} {
|
||||
finish_test
|
||||
return -code return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
proc load_lsm1_vtab {db} {
|
||||
db enable_load_extension 1
|
||||
db eval {SELECT load_extension('../lsm1')}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user