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

Unified Diff: third_party/sqlite/src/test/tkt-78e04e52ea.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/tkt-752e1646fc.test ('k') | third_party/sqlite/src/test/tkt-80ba201079.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/tkt-78e04e52ea.test
diff --git a/third_party/sqlite/src/test/tkt-78e04e52ea.test b/third_party/sqlite/src/test/tkt-78e04e52ea.test
new file mode 100644
index 0000000000000000000000000000000000000000..9524d845e2394fb342666a05dbd7f087f02713da
--- /dev/null
+++ b/third_party/sqlite/src/test/tkt-78e04e52ea.test
@@ -0,0 +1,68 @@
+# 2009 December 8
+#
+# 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.
+#
+# Verify that we can create zero-length tables.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+do_test tkt-78e04-1.0 {
+ execsql {
+ CREATE TABLE ""("" UNIQUE);
+ CREATE TABLE t2(x);
+ INSERT INTO "" VALUES(1);
+ INSERT INTO t2 VALUES(2);
+ SELECT * FROM "", t2;
+ }
+} {1 2}
+do_test tkt-78e04-1.1 {
+ catchsql {
+ INSERT INTO "" VALUES(1);
+ }
+} {1 {column is not unique}}
+do_test tkt-78e04-1.2 {
+ execsql {
+ PRAGMA table_info("");
+ }
+} {0 {} {} 0 {} 0}
+do_test tkt-78e04-1.3 {
+ execsql {
+ CREATE INDEX i1 ON ""("" COLLATE nocase);
+ }
+} {}
+do_test tkt-78e04-1.4 {
+ execsql {
+ EXPLAIN QUERY PLAN SELECT * FROM "" WHERE "" LIKE 'abc%';
+ }
+} {0 0 0 {SCAN TABLE (~500000 rows)}}
+do_test tkt-78e04-1.5 {
+ execsql {
+ DROP TABLE "";
+ SELECT name FROM sqlite_master;
+ }
+} {t2}
+
+do_test tkt-78e04-2.1 {
+ execsql {
+ CREATE INDEX "" ON t2(x);
+ EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE x=5;
+ }
+} {0 0 0 {SEARCH TABLE t2 USING COVERING INDEX (x=?) (~10 rows)}}
+do_test tkt-78e04-2.2 {
+ execsql {
+ DROP INDEX "";
+ EXPLAIN QUERY PLAN SELECT * FROM t2 WHERE x=2;
+ }
+} {0 0 0 {SCAN TABLE t2 (~100000 rows)}}
+
+finish_test
« no previous file with comments | « third_party/sqlite/src/test/tkt-752e1646fc.test ('k') | third_party/sqlite/src/test/tkt-80ba201079.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698