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

Unified Diff: third_party/sqlite/sqlite-src-3170000/ext/rbu/rbu8.test

Issue 2747283002: [sql] Import reference version of SQLite 3.17.. (Closed)
Patch Set: Created 3 years, 9 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-3170000/ext/rbu/rbu8.test
diff --git a/third_party/sqlite/sqlite-src-3170000/ext/rbu/rbu8.test b/third_party/sqlite/sqlite-src-3170000/ext/rbu/rbu8.test
new file mode 100644
index 0000000000000000000000000000000000000000..75edd4efbaf43074ff7cdba2162546751461a67e
--- /dev/null
+++ b/third_party/sqlite/sqlite-src-3170000/ext/rbu/rbu8.test
@@ -0,0 +1,75 @@
+# 2014 November 20
+#
+# 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.
+#
+#***********************************************************************
+#
+# Test the rbu_delta() feature.
+#
+
+if {![info exists testdir]} {
+ set testdir [file join [file dirname [info script]] .. .. test]
+}
+source $testdir/tester.tcl
+set ::testprefix rbu8
+
+do_execsql_test 1.0 {
+ CREATE TABLE t1(x, y PRIMARY KEY, z);
+ INSERT INTO t1 VALUES(NULL, 1, 'one');
+ INSERT INTO t1 VALUES(NULL, 2, 'two');
+ INSERT INTO t1 VALUES(NULL, 3, 'three');
+ CREATE INDEX i1z ON t1(z, x);
+}
+
+do_test 1.1 {
+ forcedelete rbu.db
+ sqlite3 db2 rbu.db
+ db2 eval {
+ CREATE TABLE data_t1(x, y, z, rbu_control);
+ INSERT INTO data_t1 VALUES('a', 1, '_i' , 'x.d');
+ INSERT INTO data_t1 VALUES('b', 2, 2 , '..x');
+ INSERT INTO data_t1 VALUES('_iii', 3, '-III' , 'd.d');
+ }
+ db2 close
+} {}
+
+do_test 1.2.1 {
+ sqlite3rbu rbu test.db rbu.db
+ rbu step
+} {SQLITE_ERROR}
+do_test 1.2.2 {
+ list [catch {rbu close} msg] $msg
+} {1 {SQLITE_ERROR - no such function: rbu_delta}}
+
+proc rbu_delta {orig new} {
+ return "${orig}${new}"
+}
+
+do_test 1.3.1 {
+ while 1 {
+ sqlite3rbu rbu test.db rbu.db
+ rbu create_rbu_delta
+ set rc [rbu step]
+ if {$rc != "SQLITE_OK"} break
+ rbu close
+ }
+ rbu close
+} {SQLITE_DONE}
+
+do_execsql_test 1.3.2 {
+ SELECT * FROM t1
+} {
+ a 1 one_i
+ {} 2 2
+ _iii 3 three-III
+}
+integrity_check 1.3.3
+
+
+finish_test
+
« no previous file with comments | « third_party/sqlite/sqlite-src-3170000/ext/rbu/rbu7.test ('k') | third_party/sqlite/sqlite-src-3170000/ext/rbu/rbu9.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698