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

Unified Diff: third_party/sqlite/sqlite-src-3080704/test/wal64k.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
Index: third_party/sqlite/sqlite-src-3080704/test/wal64k.test
diff --git a/third_party/sqlite/sqlite-src-3080704/test/wal64k.test b/third_party/sqlite/sqlite-src-3080704/test/wal64k.test
new file mode 100644
index 0000000000000000000000000000000000000000..e962da128eb59469471a3a8d90526a429084675e
--- /dev/null
+++ b/third_party/sqlite/sqlite-src-3080704/test/wal64k.test
@@ -0,0 +1,51 @@
+# 2010 April 13
+#
+# 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 regression tests for SQLite library. The
+# focus of this file is testing the operation of the library in
+# "PRAGMA journal_mode=WAL" mode.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/tester.tcl
+set testprefix wal64k
+
+ifcapable !wal {finish_test ; return }
+
+if {$tcl_platform(platform) != "unix"} {
+ finish_test
+ return
+}
+
+db close
+test_syscall pagesize 65536
+sqlite3 db test.db
+
+do_execsql_test 1.0 {
+ PRAGMA journal_mode = WAL;
+ CREATE TABLE t1(x);
+ CREATE INDEX i1 ON t1(x);
+} {wal}
+do_test 1.1 { file size test.db-shm } {65536}
+
+do_test 1.2 {
+ execsql BEGIN
+ while {[file size test.db-shm]==65536} {
+ execsql { INSERT INTO t1 VALUES( randstr(900,1100) ) }
+ }
+ execsql COMMIT
+ file size test.db-shm
+} {131072}
+
+integrity_check 1.3
+
+db close
+test_syscall pagesize -1
+finish_test
« no previous file with comments | « third_party/sqlite/sqlite-src-3080704/test/wal6.test ('k') | third_party/sqlite/sqlite-src-3080704/test/wal7.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698