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

     1  # 2019 April 30
     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  #
    12  
    13  set testdir [file dirname $argv0]
    14  source $testdir/tester.tcl
    15  source $testdir/fts3_common.tcl
    16  set ::testprefix fts4rename
    17  
    18  # If SQLITE_ENABLE_FTS3 is defined, omit this file.
    19  ifcapable !fts3 {
    20    finish_test
    21    return
    22  }
    23  
    24  do_execsql_test 1.0 {
    25    CREATE VIRTUAL TABLE temp.t1 USING fts3(a);
    26    BEGIN;
    27    CREATE TABLE t2(x);
    28  } {}
    29  
    30  do_catchsql_test 1.1 {
    31    ALTER TABLE t1_content RENAME c0a TO docid;
    32  } {1 {error in table t1_content after rename: duplicate column name: docid}}
    33  
    34  do_catchsql_test 1.2 {
    35    UPDATE t1 SET Col0 = 1 ;
    36  } {1 {no such column: Col0}}
    37  
    38  do_catchsql_test 1.3 {
    39    ROLLBACK;
    40    DROP TABLE t1;
    41  } {0 {}}
    42  
    43  finish_test