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

Unified Diff: third_party/sqlite/src/test/tkt-4ef7e3cfca.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/tkt-4dd95f6943.test ('k') | third_party/sqlite/src/test/tkt-54844eea3f.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-4ef7e3cfca.test
diff --git a/third_party/sqlite/src/test/tkt-4ef7e3cfca.test b/third_party/sqlite/src/test/tkt-4ef7e3cfca.test
new file mode 100644
index 0000000000000000000000000000000000000000..fc1efdef666f967486c70cd7d307f40f87c10e99
--- /dev/null
+++ b/third_party/sqlite/src/test/tkt-4ef7e3cfca.test
@@ -0,0 +1,68 @@
+# 2014-03-04
+#
+# 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 tests to verify that ticket [4ef7e3cfca] has been
+# fixed.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+set testprefix tkt-4ef7e3cfca
+
+do_catchsql_test 1.1 {
+ CREATE TABLE x(a);
+ CREATE TRIGGER t AFTER INSERT ON x BEGIN
+ SELECT * FROM x WHERE abc.a = 1;
+ END;
+ INSERT INTO x VALUES('assert');
+} {1 {no such column: abc.a}}
+
+reset_db
+do_execsql_test 2.1 {
+ CREATE TABLE w(a);
+ CREATE TABLE x(a);
+ CREATE TABLE y(a);
+ CREATE TABLE z(a);
+
+ INSERT INTO x(a) VALUES(5);
+ INSERT INTO y(a) VALUES(10);
+
+ CREATE TRIGGER t AFTER INSERT ON w BEGIN
+ INSERT INTO z
+ SELECT (SELECT x.a + y.a FROM y) FROM x;
+ END;
+ INSERT INTO w VALUES('incorrect');
+}
+do_execsql_test 2.2 {
+ SELECT * FROM z;
+} {15}
+
+reset_db
+do_execsql_test 3.1 {
+ CREATE TABLE w(a);
+ CREATE TABLE x(b);
+ CREATE TABLE y(a);
+ CREATE TABLE z(a);
+
+ INSERT INTO x(b) VALUES(5);
+ INSERT INTO y(a) VALUES(10);
+
+ CREATE TRIGGER t AFTER INSERT ON w BEGIN
+ INSERT INTO z
+ SELECT (SELECT x.b + y.a FROM y) FROM x;
+ END;
+ INSERT INTO w VALUES('assert');
+}
+do_execsql_test 3.2 {
+ SELECT * FROM z;
+} {15}
+
+finish_test
« no previous file with comments | « third_party/sqlite/src/test/tkt-4dd95f6943.test ('k') | third_party/sqlite/src/test/tkt-54844eea3f.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698