SQLite

Check-in [40a40e81b3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the filefmt.test test script to conform to the previous check-in. (CVS 6781)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 40a40e81b3ad80114422d6a48146e5fb27e2551d
User & Date: drh 2009-06-18 11:34:43.000
Context
2009-06-18
17:22
Move codec management from database connections into the pager so that it will work together with shared cache. (CVS 6782) (check-in: ed08b53cd6 user: drh tags: trunk)
11:34
Update the filefmt.test test script to conform to the previous check-in. (CVS 6781) (check-in: 40a40e81b3 user: drh tags: trunk)
11:29
Reduce the minimum usable page space to 480 byte from 500 bytes. (CVS 6780) (check-in: db4fb83536 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/filefmt.test.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests to verify database file format.
#
# $Id: filefmt.test,v 1.2 2007/04/06 21:42:22 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
db close
file delete -force test.db test.db-journal

# Database begins with valid 16-byte header string.







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests to verify database file format.
#
# $Id: filefmt.test,v 1.3 2009/06/18 11:34:43 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
db close
file delete -force test.db test.db-journal

# Database begins with valid 16-byte header string.
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
  sqlite3 db test.db
  catchsql {
     SELECT count(*) FROM sqlite_master
  }
} {1 {file is encrypted or is not a database}}

# Usable space per page (page-size minus unused space per page)
# must be at least 500 bytes
#
ifcapable pager_pragmas {
  do_test filefmt-1.8 {
    db close
    file delete -force test.db
    sqlite3 db test.db
    db eval {PRAGMA page_size=512; CREATE TABLE t1(x)}
    db close
    hexio_write test.db 20 10
    sqlite3 db test.db
    catchsql {
       SELECT count(*) FROM sqlite_master
    }
  } {1 {file is encrypted or is not a database}}
}


finish_test







|








|









90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
  sqlite3 db test.db
  catchsql {
     SELECT count(*) FROM sqlite_master
  }
} {1 {file is encrypted or is not a database}}

# Usable space per page (page-size minus unused space per page)
# must be at least 480 bytes
#
ifcapable pager_pragmas {
  do_test filefmt-1.8 {
    db close
    file delete -force test.db
    sqlite3 db test.db
    db eval {PRAGMA page_size=512; CREATE TABLE t1(x)}
    db close
    hexio_write test.db 20 21
    sqlite3 db test.db
    catchsql {
       SELECT count(*) FROM sqlite_master
    }
  } {1 {file is encrypted or is not a database}}
}


finish_test