/ Check-in [d82e8cd4]
Login

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

Overview
Comment:Modify test script backup2.test so that it works on OSX. (CVS 6357)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d82e8cd43f46dda15fd15b567901a7dbb2276287
User & Date: danielk1977 2009-03-18 13:55:30
Context
2009-03-18
18:43
Fix a crash that could occur when creating an index in shared-cache mode with lookaside enabled. (CVS 6358) check-in: 097737e3 user: danielk1977 tags: trunk
13:55
Modify test script backup2.test so that it works on OSX. (CVS 6357) check-in: d82e8cd4 user: danielk1977 tags: trunk
10:36
Add comments and testcase() macros to the fix for shared-cache schema default value problem of check-in (6353). (CVS 6356) check-in: 05d8607d user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/backup2.test.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing the "backup" and "restore" methods
# of the TCL interface - methods which are based on the
# sqlite3_backup_XXX API.
#
# $Id: backup2.test,v 1.2 2009/02/11 16:06:19 shane Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Fill a database with test data.
#
do_test backup2-1 {
................................................................................
  set rc [catch {db backup temp bu2.db} res]
  lappend rc $res
} {1 {backup failed: attempt to write a readonly database}}

# Try to backup to something that is not a database file.
#
do_test backup2-7 {
  catch {file attributes bu2.db -permissions rw-------}
  catch {file attributes bu2.db -readonly 0}
  set out [open bu2.db w]
  puts $out "This is not a valid database file"
  close $out
  set rc [catch {db backup temp bu2.db} res]
  lappend rc $res
} {1 {backup failed: file is encrypted or is not a database}}








|







 







|
|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing the "backup" and "restore" methods
# of the TCL interface - methods which are based on the
# sqlite3_backup_XXX API.
#
# $Id: backup2.test,v 1.3 2009/03/18 13:55:30 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Fill a database with test data.
#
do_test backup2-1 {
................................................................................
  set rc [catch {db backup temp bu2.db} res]
  lappend rc $res
} {1 {backup failed: attempt to write a readonly database}}

# Try to backup to something that is not a database file.
#
do_test backup2-7 {
  catch {file attributes bu2.db -readonly 0}
  catch {file attributes bu2.db -permissions rw-------}
  set out [open bu2.db w]
  puts $out "This is not a valid database file"
  close $out
  set rc [catch {db backup temp bu2.db} res]
  lappend rc $res
} {1 {backup failed: file is encrypted or is not a database}}