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

Unified Diff: third_party/sqlite/test/corruptA.test

Issue 3108030: Move bundled copy of sqlite one level deeper to better separate it... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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/test/corrupt9.test ('k') | third_party/sqlite/test/corruptB.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/test/corruptA.test
===================================================================
--- third_party/sqlite/test/corruptA.test (revision 56608)
+++ third_party/sqlite/test/corruptA.test (working copy)
@@ -1,72 +0,0 @@
-# 2008 July 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.
-#
-#***********************************************************************
-# This file implements regression tests for SQLite library.
-#
-# This file implements tests to make sure SQLite does not crash or
-# segfault if it sees a corrupt database file. It specifically focuses
-# on corrupt database headers.
-#
-# $Id: corruptA.test,v 1.1 2008/07/11 16:39:23 drh Exp $
-
-set testdir [file dirname $argv0]
-source $testdir/tester.tcl
-
-
-# Create a database to work with.
-#
-do_test corruptA-1.1 {
- execsql {
- CREATE TABLE t1(x);
- INSERT INTO t1(x) VALUES(1);
- }
- expr {[file size test.db]>=1024}
-} {1}
-integrity_check corruptA-1.2
-
-# Corrupt the file header in various ways and make sure the corruption
-# is detected when opening the database file.
-#
-db close
-file copy -force test.db test.db-template
-
-do_test corruptA-2.1 {
- file copy -force test.db-template test.db
- hexio_write test.db 19 02 ;# the read format number
- sqlite3 db test.db
- catchsql {SELECT * FROM t1}
-} {1 {file is encrypted or is not a database}}
-
-do_test corruptA-2.2 {
- db close
- file copy -force test.db-template test.db
- hexio_write test.db 21 41 ;# max embedded payload fraction
- sqlite3 db test.db
- catchsql {SELECT * FROM t1}
-} {1 {file is encrypted or is not a database}}
-
-do_test corruptA-2.3 {
- db close
- file copy -force test.db-template test.db
- hexio_write test.db 22 1f ;# min embedded payload fraction
- sqlite3 db test.db
- catchsql {SELECT * FROM t1}
-} {1 {file is encrypted or is not a database}}
-
-do_test corruptA-2.4 {
- db close
- file copy -force test.db-template test.db
- hexio_write test.db 23 21 ;# min leaf payload fraction
- sqlite3 db test.db
- catchsql {SELECT * FROM t1}
-} {1 {file is encrypted or is not a database}}
-
-
-finish_test
« no previous file with comments | « third_party/sqlite/test/corrupt9.test ('k') | third_party/sqlite/test/corruptB.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698