File: fts3integrity.test

package info (click to toggle)
sqlite3 3.46.1-8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 150,944 kB
  • sloc: ansic: 281,304; tcl: 19,550; javascript: 12,978; sh: 10,768; java: 8,151; makefile: 1,689; yacc: 1,644; cpp: 440; cs: 307; sql: 45
file content (42 lines) | stat: -rw-r--r-- 931 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 2023 December 16
#
#    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.
#
#***********************************************************************
# This file runs all tests.
#
# $Id: fts3.test,v 1.2 2008/07/23 18:17:32 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
set ::testprefix fts3integrity

# If SQLITE_ENABLE_FTS3 is defined, omit this file.
ifcapable !fts3 {
  finish_test
  return
}
  
do_execsql_test 1.0 {
  CREATE VIRTUAL TABLE t1 USING fts3(x);
  INSERT INTO t1 VALUES('first row');
  INSERT INTO t1 VALUES('second row');

  CREATE TABLE t2(x PRIMARY KEY);
  INSERT INTO t2 VALUES('first row');
  INSERT INTO t2 VALUES('second row');
}

sqlite3 db2 test.db

do_execsql_test -db db2 1.1 {
  CREATE TABLE t3(x, y);
}

do_execsql_test 1.2 {
  PRAGMA integrity_check;
} {ok}

finish_test