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

Unified Diff: third_party/sqlite/src/test/fts3prefix2.test

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « third_party/sqlite/src/test/fts3prefix.test ('k') | third_party/sqlite/src/test/fts3query.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/fts3prefix2.test
diff --git a/third_party/sqlite/src/test/fts3prefix2.test b/third_party/sqlite/src/test/fts3prefix2.test
new file mode 100644
index 0000000000000000000000000000000000000000..e033fb6bcb82e2158c7ed1eb0af77786bd695813
--- /dev/null
+++ b/third_party/sqlite/src/test/fts3prefix2.test
@@ -0,0 +1,61 @@
+# 2012 January 25
+#
+# 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 FTS3 module.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+set testprefix fts3prefix2
+
+ifcapable !fts3 {
+ finish_test
+ return
+}
+
+do_execsql_test 1.0 { PRAGMA page_size = 512 }
+do_execsql_test 1.1 {
+ CREATE VIRTUAL TABLE t1 USING fts4(x, prefix="2,3");
+
+ BEGIN;
+ INSERT INTO t1 VALUES('T TX T TX T TX T TX T TX');
+ INSERT INTO t1 SELECT * FROM t1; -- 2
+ INSERT INTO t1 SELECT * FROM t1; -- 4
+ INSERT INTO t1 SELECT * FROM t1; -- 8
+ INSERT INTO t1 SELECT * FROM t1; -- 16
+ INSERT INTO t1 SELECT * FROM t1; -- 32
+ INSERT INTO t1 SELECT * FROM t1; -- 64
+ INSERT INTO t1 SELECT * FROM t1; -- 128
+ INSERT INTO t1 SELECT * FROM t1; -- 256
+ INSERT INTO t1 SELECT * FROM t1; -- 512
+ INSERT INTO t1 SELECT * FROM t1; -- 1024
+ INSERT INTO t1 SELECT * FROM t1; -- 2048
+ COMMIT;
+}
+
+do_execsql_test 1.2 {
+ INSERT INTO t1 SELECT * FROM t1 LIMIT 10;
+ INSERT INTO t1 SELECT * FROM t1 LIMIT 10;
+ INSERT INTO t1 SELECT * FROM t1 LIMIT 10;
+ DELETE FROM t1 WHERE docid > 5;
+}
+
+do_execsql_test 1.3 {
+ SELECT * FROM t1 WHERE t1 MATCH 'T*';
+} {
+ {T TX T TX T TX T TX T TX}
+ {T TX T TX T TX T TX T TX}
+ {T TX T TX T TX T TX T TX}
+ {T TX T TX T TX T TX T TX}
+ {T TX T TX T TX T TX T TX}
+}
+
+finish_test
« no previous file with comments | « third_party/sqlite/src/test/fts3prefix.test ('k') | third_party/sqlite/src/test/fts3query.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698