CoolFace
Modelpublic

AryaWu/sqlite

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
fts3tok_err.test48 linesDownload Raw Back to test
1# 2013 April 222#3# The author disclaims copyright to this source code.  In place of4# a legal notice, here is a blessing:5#6#    May you do good and not evil.7#    May you find forgiveness for yourself and forgive others.8#    May you share freely, never taking more than you give.9#10#*************************************************************************11# This file implements regression tests for SQLite library.  The12# focus of this script is testing the "fts3tokenize" virtual table13# that is part of the FTS3 module.14#15 16set testdir [file dirname $argv0]17source $testdir/tester.tcl18source $testdir/malloc_common.tcl19ifcapable !fts3 { finish_test ; return }20set ::testprefix fts3tok_err21 22 23faultsim_save_and_close24do_faultsim_test fts3tok_err-1 -faults oom* -prep {25  faultsim_restore_and_reopen26} -body {27  execsql { CREATE VIRTUAL TABLE t1 USING fts3tokenize("simple"); }28} -test {29  faultsim_test_result {0 {}} 30}31 32do_test fts3tok_err-2.prep {33  faultsim_delete_and_reopen 34  execsql { CREATE VIRTUAL TABLE t1 USING fts3tokenize("simple"); }35  faultsim_save_and_close36} {}37 38do_faultsim_test fts3tok_err-2 -faults oom* -prep {39  faultsim_restore_and_reopen40} -body {41  execsql { SELECT token FROM t1 WHERE input = 'A galaxy far, far away' } 42} -test {43  faultsim_test_result {0 {a galaxy far far away}} 44}45 46 47finish_test48