gitlab.com/CoiaPrant/sqlite3@v1.19.1/testdata/tcl/fts3dropmod.test (about)

     1  # 2021 December 16
     2  #
     3  # The author disclaims copyright to this source code.  In place of
     4  # 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.  The
    12  # focus of this script is testing the FTS3 module.
    13  #
    14  # $Id: fts3aa.test,v 1.1 2007/08/20 17:38:42 shess Exp $
    15  #
    16  
    17  set testdir [file dirname $argv0]
    18  source $testdir/tester.tcl
    19  set testprefix fts3dropmod
    20  
    21  # If SQLITE_ENABLE_FTS3 is defined, omit this file.
    22  ifcapable !fts3 {
    23    finish_test
    24    return
    25  }
    26  
    27  sqlite3_drop_modules db fts3
    28  do_execsql_test 1.0 {
    29    CREATE VIRTUAL TABLE t1 USING fts3(x);
    30  } 
    31  do_catchsql_test 1.1 {
    32    CREATE VIRTUAL TABLE t2 USING fts4(x);
    33  } {1 {no such module: fts4}}
    34  
    35  reset_db
    36  sqlite3_drop_modules db fts4
    37  do_execsql_test 2.0 {
    38    CREATE VIRTUAL TABLE t1 USING fts4(x);
    39  } 
    40  do_catchsql_test 2.1 {
    41    CREATE VIRTUAL TABLE t2 USING fts3(x);
    42  } {1 {no such module: fts3}}
    43  
    44  finish_test