1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix backup2.test so that it passes on OpenBSD (which produces a slightly different error message in one case).

FossilOrigin-Name: 227cfe11c4a1c095ccad76116dc4a68cccc5e8f0
This commit is contained in:
dan
2012-01-13 15:21:07 +00:00
parent 961e4ca413
commit 983371d999
3 changed files with 18 additions and 21 deletions

View File

@ -142,21 +142,18 @@ do_test backup2-9 {
# Try to restore from an unreadable file.
#
if {$tcl_platform(platform)=="windows"} {
do_test backup2-10 {
forcedelete bu3.db
file mkdir bu3.db
set rc [catch {db restore temp bu3.db} res]
lappend rc $res
} {1 {cannot open source database: unable to open database file}}
}
if {$tcl_platform(platform)!="windows"} {
do_test backup2-10 {
forcedelete bu3.db
file mkdir bu3.db
set rc [catch {db restore temp bu3.db} res]
lappend rc $res
} {1 {cannot open source database: disk I/O error}}
set msg {cannot open source database: unable to open database file}
} elseif {$tcl_platform(os)=="OpenBSD"} {
set msg {restore failed: file is encrypted or is not a database}
} else {
set msg {cannot open source database: disk I/O error}
}
do_test backup2-10 {
forcedelete bu3.db
file mkdir bu3.db
set rc [catch {db restore temp bu3.db} res]
lappend rc $res
} [list 1 $msg]
# Try to restore from something that is not a database file.
#