3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #*************************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this script is testing the FTS5 module.
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
17 set testprefix fts4umlaut
25 CREATE VIRTUAL TABLE t1 USING fts4(x, tokenize=unicode61);
26 CREATE VIRTUAL TABLE t2 USING fts4(
28 tokenize=unicode61 "remove_diacritics=2"
32 foreach {tn q res1 res2} {
38 6 "Ha N\u006f\u0302i" 1 1
39 7 "Ha N\u006f\u0323\u0302i" 1 1
41 do_execsql_test 1.$tn.1 {
43 INSERT INTO t1(rowid, x) VALUES (1, 'Ha Noi');
44 SELECT count(*) FROM t1 WHERE t1 MATCH $q
46 do_execsql_test 1.$tn.2 {
48 INSERT INTO t1(rowid, x) VALUES (1, $q);
49 SELECT count(*) FROM t1 WHERE t1 MATCH 'Ha Noi'
52 do_execsql_test 1.$tn.3 {
54 INSERT INTO t2(rowid, x) VALUES (1, 'Ha Noi');
55 SELECT count(*) FROM t2 WHERE t2 MATCH $q
57 do_execsql_test 1.$tn.4 {
59 INSERT INTO t2(rowid, x) VALUES (1, $q);
60 SELECT count(*) FROM t2 WHERE t2 MATCH 'Ha Noi'