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

Unified Diff: third_party/sqlite/src/test/misc1.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/minmax4.test ('k') | third_party/sqlite/src/test/misc2.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/misc1.test
diff --git a/third_party/sqlite/src/test/misc1.test b/third_party/sqlite/src/test/misc1.test
index a78e4884e93395881b70957202cfa5297b51720a..173b77d63776ffc7c8ac2710cb520ab52f0bf653 100644
--- a/third_party/sqlite/src/test/misc1.test
+++ b/third_party/sqlite/src/test/misc1.test
@@ -235,7 +235,7 @@ do_test misc1-7.4 {
catchsql {
INSERT INTO t5 VALUES(1,2,4);
}
-} {1 {columns a, b are not unique}}
+} {1 {UNIQUE constraint failed: t5.a, t5.b}}
do_test misc1-7.5 {
catchsql {
INSERT INTO t5 VALUES(0,2,4);
@@ -472,6 +472,11 @@ ifcapable subquery {
} {1 2 3 4 5 6 7 8 9 10 11}
}
+#
+# The following tests can only work if the current SQLite VFS has the concept
+# of a current directory.
+#
+ifcapable curdir {
# Make sure a database connection still works after changing the
# working directory.
#
@@ -491,10 +496,11 @@ do_test misc1-14.2b {
} {1}
do_test misc1-14.3 {
cd ..
- file delete -force tempdir
+ forcedelete tempdir
execsql {COMMIT}
file exists ./test.db-journal
} {0}
+}
# A failed create table should not leave the table in the internal
# data structures. Ticket #238.
@@ -586,4 +592,33 @@ do_test misc1-18.1 {
expr {$n>=100}
} {1}
+# 2014-01-10: In a CREATE TABLE AS, if one or more of the column names
+# are an empty string, that is still OK.
+#
+do_execsql_test misc1-19.1 {
+ CREATE TABLE t19 AS SELECT 1, 2 AS '', 3;
+ SELECT * FROM t19;
+} {1 2 3}
+do_execsql_test misc1-19.2 {
+ CREATE TABLE t19b AS SELECT 4 AS '', 5 AS '', 6 AS '';
+ SELECT * FROM t19b;
+} {4 5 6}
+
+# 2014-05-16: Tests for the SQLITE_TESTCTRL_FAULT_INSTALL feature.
+#
+unset -nocomplain fault_callbacks
+set fault_callbacks {}
+proc fault_callback {n} {
+ lappend ::fault_callbacks $n
+ return 0
+}
+do_test misc1-19.1 {
+ sqlite3_test_control_fault_install fault_callback
+ set fault_callbacks
+} {0}
+do_test misc1-19.2 {
+ sqlite3_test_control_fault_install
+ set fault_callbacks
+} {0}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/minmax4.test ('k') | third_party/sqlite/src/test/misc2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698