Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1875)

Unified Diff: third_party/sqlite/src/ext/fts5/test/fts5colset.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/src/ext/fts5/test/fts5colset.test
diff --git a/third_party/sqlite/src/ext/fts5/test/fts5colset.test b/third_party/sqlite/src/ext/fts5/test/fts5colset.test
new file mode 100644
index 0000000000000000000000000000000000000000..e3333241ee05aff70cdd855d1105e0100169ca0e
--- /dev/null
+++ b/third_party/sqlite/src/ext/fts5/test/fts5colset.test
@@ -0,0 +1,59 @@
+# 2016 August 10
+#
+# The author disclaims copyright to this source code. In place of
+# a legal notice, here is a blessing:
+#
+# 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 implements regression tests for SQLite library. The
+# focus of this script is testing the FTS5 module.
+#
+
+source [file join [file dirname [info script]] fts5_common.tcl]
+set testprefix fts5colset
+
+# If SQLITE_ENABLE_FTS5 is not defined, omit this file.
+ifcapable !fts5 {
+ finish_test
+ return
+}
+
+foreach_detail_mode $::testprefix {
+ if {[detail_is_none]} continue
+
+ do_execsql_test 1.0 {
+ CREATE VIRTUAL TABLE t1 USING fts5(a, b, c, d, detail=%DETAIL%);
+ INSERT INTO t1 VALUES('a', 'b', 'c', 'd'); -- 1
+ INSERT INTO t1 VALUES('d', 'a', 'b', 'c'); -- 2
+ INSERT INTO t1 VALUES('c', 'd', 'a', 'b'); -- 3
+ INSERT INTO t1 VALUES('b', 'c', 'd', 'a'); -- 4
+ }
+
+ foreach {tn q res} {
+ 1 "a" {1 2 3 4}
+ 2 "{a} : a" {1}
+ 3 "-{a} : a" {2 3 4}
+ 4 "- {a c} : a" {2 4}
+ 5 " - {d d c} : a" {1 2}
+ 6 "- {d c b a} : a" {}
+ 7 "-{\"a\"} : b" {1 2 3}
+ 8 "- c : a" {1 2 4}
+ 9 "-c : a" {1 2 4}
+ 10 "-\"c\" : a" {1 2 4}
+ } {
+ breakpoint
+ do_execsql_test 1.$tn {
+ SELECT rowid FROM t1($q)
+ } $res
+ }
+
+
+}
+
+
+finish_test
+
+
« no previous file with comments | « third_party/sqlite/src/ext/fts5/test/fts5bigtok.test ('k') | third_party/sqlite/src/ext/fts5/test/fts5config.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698