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

Side by Side Diff: third_party/sqlite/src/test/corrupt4.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/corrupt3.test ('k') | third_party/sqlite/src/test/corrupt6.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2007 Sept 7 1 # 2007 Sept 7
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
11 # This file implements regression tests for SQLite library. 11 # This file implements regression tests for SQLite library.
12 # 12 #
13 # This file implements tests to make sure SQLite does not crash or 13 # This file implements tests to make sure SQLite does not crash or
14 # segfault if it sees a corrupt database file. 14 # segfault if it sees a corrupt database file.
15 # 15 #
16 # $Id: corrupt4.test,v 1.1 2007/09/07 14:32:07 drh Exp $ 16 # $Id: corrupt4.test,v 1.1 2007/09/07 14:32:07 drh Exp $
17 17
18 set testdir [file dirname $argv0] 18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl 19 source $testdir/tester.tcl
20 20
21 # Do not use a codec for tests in this file, as the database file is
22 # manipulated directly using tcl scripts (using the [hexio_write] command).
23 #
24 do_not_use_codec
25
21 # We must have the page_size pragma for these tests to work. 26 # We must have the page_size pragma for these tests to work.
22 # 27 #
23 ifcapable !pager_pragmas { 28 ifcapable !pager_pragmas {
24 finish_test 29 finish_test
25 return 30 return
26 } 31 }
27 32
28 # Create a database with a freelist containing at least two pages. 33 # Create a database with a freelist containing at least two pages.
29 # 34 #
30 do_test corrupt4-1.1 { 35 do_test corrupt4-1.1 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 do_test corrupt4-1.4 { 70 do_test corrupt4-1.4 {
66 hexio_write test.db [expr {$::baseaddr+4}] [hexio_render_int32 -100000000] 71 hexio_write test.db [expr {$::baseaddr+4}] [hexio_render_int32 -100000000]
67 db close 72 db close
68 sqlite3 db test.db 73 sqlite3 db test.db
69 catchsql { 74 catchsql {
70 DROP TABLE t2 75 DROP TABLE t2
71 } 76 }
72 } {1 {database disk image is malformed}} 77 } {1 {database disk image is malformed}}
73 78
74 finish_test 79 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/corrupt3.test ('k') | third_party/sqlite/src/test/corrupt6.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698