SQLite

Check-in [8d05f66db7]
Login

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

Overview
Comment:Fix backcompat.test so that it works with windows mandatory locking.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8d05f66db7d6e8b8916fcf22fa92159d863d2610
User & Date: dan 2010-08-19 17:16:11.000
Context
2010-08-20
12:31
Avoid assuming that the user has "." in their path when running multi-process tests. (check-in: daa5d461b9 user: dan tags: trunk)
2010-08-19
18:05
Adjust filename globbing in backcompat.test for Windows. (check-in: b0f4796306 user: shaneh tags: trunk)
17:16
Fix backcompat.test so that it works with windows mandatory locking. (check-in: 8d05f66db7 user: dan tags: trunk)
15:48
Add tests for WAL mode to test/backcompat.test. (check-in: 7999910e85 user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/backcompat.test.
110
111
112
113
114
115
116
117
118
119


120







121
122
123
124
125
126
127
      set ::incompatible([get_version $bin]) 1
    }
  }
}

proc read_file {zFile} {
  set zData {}
  catch {
    set fd [open $zFile]
    fconfigure $fd -translation binary -encoding binary


    set zData [read $fd]







    close $fd
  }
  return $zData
}
proc write_file {zFile zData} {
  set fd [open $zFile w]
  fconfigure $fd -translation binary -encoding binary







|


>
>
|
>
>
>
>
>
>
>







110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
      set ::incompatible([get_version $bin]) 1
    }
  }
}

proc read_file {zFile} {
  set zData {}
  if {[file exists $zFile]} {
    set fd [open $zFile]
    fconfigure $fd -translation binary -encoding binary

    if {[file size $zFile]<=$::sqlite_pending_byte || $zFile != "test.db"} {
      set zData [read $fd]
    } else {
      set zData [read $fd $::sqlite_pending_byte]
      append zData [string repeat x 512]
      seek $fd [expr $::sqlite_pending_byte+512] start
      append zData [read $fd]
    }

    close $fd
  }
  return $zData
}
proc write_file {zFile zData} {
  set fd [open $zFile w]
  fconfigure $fd -translation binary -encoding binary