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

Unified Diff: third_party/sqlite/src/ext/session/sessionwor.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 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/src/ext/session/sessionwor.test
diff --git a/third_party/sqlite/src/ext/session/sessionwor.test b/third_party/sqlite/src/ext/session/sessionwor.test
new file mode 100644
index 0000000000000000000000000000000000000000..d906a92b6211cab5f83aaad295acabd819fa3888
--- /dev/null
+++ b/third_party/sqlite/src/ext/session/sessionwor.test
@@ -0,0 +1,57 @@
+# 2017 Jan 31
+#
+# 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.
+#
+#***********************************************************************
+#
+# The focus of this file is testing the session module. Specifically,
+# testing support for WITHOUT ROWID tables.
+#
+
+if {![info exists testdir]} {
+ set testdir [file join [file dirname [info script]] .. .. test]
+}
+source [file join [file dirname [info script]] session_common.tcl]
+source $testdir/tester.tcl
+ifcapable !session {finish_test; return}
+
+set testprefix sessionwor
+
+proc test_reset {} {
+ catch { db close }
+ catch { db2 close }
+ forcedelete test.db test.db2
+ sqlite3 db test.db
+ sqlite3 db2 test.db2
+}
+
+
+do_execsql_test 1.0 {
+ CREATE TABLE t1(a PRIMARY KEY, b) WITHOUT ROWID;
+}
+
+do_iterator_test 1.1 t1 {
+ INSERT INTO t1 VALUES('one', 'two');
+} {
+ {INSERT t1 0 X. {} {t one t two}}
+}
+
+do_iterator_test 1.2 t1 {
+ UPDATE t1 SET b='three'
+} {
+ {UPDATE t1 0 X. {t one t two} {{} {} t three}}
+}
+
+do_iterator_test 1.3 t1 {
+ DELETE FROM t1;
+} {
+ {DELETE t1 0 X. {t one t three} {}}
+}
+
+finish_test
+
« no previous file with comments | « third_party/sqlite/src/ext/session/sessionfault2.test ('k') | third_party/sqlite/src/ext/session/sqlite3session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698