/ Check-in [227cfe11]
Login

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

Overview
Comment:Fix backup2.test so that it passes on OpenBSD (which produces a slightly different error message in one case).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:227cfe11c4a1c095ccad76116dc4a68cccc5e8f0
User & Date: dan 2012-01-13 15:21:07
Context
2012-01-13
15:50
Update the documentation for the sqlite3_uri_*() routines to make it clear that there argument must be a database filename passed into xOpen(). No changes to code. check-in: 08230a3a user: drh tags: trunk
15:21
Fix backup2.test so that it passes on OpenBSD (which produces a slightly different error message in one case). check-in: 227cfe11 user: dan tags: trunk
14:50
Do not throw an error from within test_journal.c if a database file size is not an integer multiple of the page-size. check-in: 3f4899a9 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to test/backup2.test.

   138    138     set rc [catch {db backup} res]
   139    139     lappend rc $res
   140    140   } {1 {wrong # args: should be "db backup ?DATABASE? FILENAME"}}
   141    141   
   142    142   # Try to restore from an unreadable file.
   143    143   #
   144    144   if {$tcl_platform(platform)=="windows"} {
   145         -  do_test backup2-10 {
   146         -    forcedelete bu3.db
   147         -    file mkdir bu3.db
   148         -    set rc [catch {db restore temp bu3.db} res]
   149         -    lappend rc $res
   150         -  } {1 {cannot open source database: unable to open database file}}
          145  +  set msg {cannot open source database: unable to open database file}
          146  +} elseif {$tcl_platform(os)=="OpenBSD"} {
          147  +  set msg {restore failed: file is encrypted or is not a database}
          148  +} else {
          149  +  set msg {cannot open source database: disk I/O error}
   151    150   }
   152         -if {$tcl_platform(platform)!="windows"} {
   153    151     do_test backup2-10 {
   154    152       forcedelete bu3.db
   155    153       file mkdir bu3.db
   156    154       set rc [catch {db restore temp bu3.db} res]
   157    155       lappend rc $res
   158         -  } {1 {cannot open source database: disk I/O error}}
   159         -}
          156  +} [list 1 $msg]
   160    157   
   161    158   # Try to restore from something that is not a database file.
   162    159   #
   163    160   do_test backup2-11 {
   164    161     set rc [catch {db restore temp bu2.db} res]
   165    162     lappend rc $res
   166    163   } {1 {restore failed: file is encrypted or is not a database}}