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

Unified Diff: third_party/sqlite/sqlite-src-3100200/test/sqldiff1.test

Issue 1610543003: [sql] Import reference version of SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/sqlite-src-3100200/test/sqldiff1.test
diff --git a/third_party/sqlite/sqlite-src-3100200/test/sqldiff1.test b/third_party/sqlite/sqlite-src-3100200/test/sqldiff1.test
new file mode 100644
index 0000000000000000000000000000000000000000..3201fb3654825c9f5477e969fd441c6327cf2579
--- /dev/null
+++ b/third_party/sqlite/sqlite-src-3100200/test/sqldiff1.test
@@ -0,0 +1,65 @@
+# 2015-05-11
+#
+# 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.
+#
+#***********************************************************************
+#
+# Quick tests for the sqldiff tool
+#
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+
+if {$tcl_platform(platform)=="windows"} {
+ set PROG "sqldiff.exe"
+} else {
+ set PROG "./sqldiff"
+}
+if {![file exe $PROG]} {
+ puts "sqldiff cannot run because $PROG is not available"
+ finish_test
+ return
+}
+db close
+forcedelete test.db test2.db
+sqlite3 db test.db
+
+do_test sqldiff-1.0 {
+ db eval {
+ CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
+ CREATE TABLE t2(a INT PRIMARY KEY, b) WITHOUT ROWID;
+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<100)
+ INSERT INTO t1(a,b) SELECT x, printf('abc-%d-xyz',x) FROM c;
+ INSERT INTO t2(a,b) SELECT a, b FROM t1;
+ }
+ db backup test2.db
+ db eval {
+ ATTACH 'test2.db' AS x2;
+ DELETE FROM x2.t1 WHERE a=49;
+ DELETE FROM x2.t2 WHERE a=48;
+ INSERT INTO x2.t1(a,b) VALUES(1234,'hello');
+ INSERT INTO x2.t2(a,b) VALUES(50.5,'xyzzy');
+ CREATE TABLE x2.t3(a,b,c);
+ INSERT INTO x2.t3 VALUES(111,222,333);
+ CREATE TABLE main.t4(x,y,z);
+ INSERT INTO t4 SELECT * FROM t3;
+ }
+ set line "exec $PROG test.db test2.db"
+ unset -nocomplain ::MSG
+ catch {eval $line} ::MSG
+} {0}
+do_test sqldiff-1.1 {
+ set ::MSG
+} {DELETE FROM t1 WHERE a=49;
+INSERT INTO t1(a,b) VALUES(1234,'hello');
+DELETE FROM t2 WHERE a=48;
+INSERT INTO t2(a,b) VALUES(50.5,'xyzzy');
+CREATE TABLE t3(a,b,c);
+INSERT INTO t3(rowid,a,b,c) VALUES(1,111,222,333);
+DROP TABLE t4;}
+
+finish_test
« no previous file with comments | « third_party/sqlite/sqlite-src-3100200/test/spellfix3.test ('k') | third_party/sqlite/sqlite-src-3100200/test/sqllimits1.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698