/ Check-in [8d05f66d]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8d05f66db7d6e8b8916fcf22fa92159d863d2610
User & Date: dan 2010-08-19 17:16:11
Context
2010-08-20
12:31
Avoid assuming that the user has "." in their path when running multi-process tests. check-in: daa5d461 user: dan tags: trunk
2010-08-19
18:05
Adjust filename globbing in backcompat.test for Windows. check-in: b0f47963 user: shaneh tags: trunk
17:16
Fix backcompat.test so that it works with windows mandatory locking. check-in: 8d05f66d user: dan tags: trunk
15:48
Add tests for WAL mode to test/backcompat.test. check-in: 7999910e user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to test/backcompat.test.

   110    110         set ::incompatible([get_version $bin]) 1
   111    111       }
   112    112     }
   113    113   }
   114    114   
   115    115   proc read_file {zFile} {
   116    116     set zData {}
   117         -  catch {
          117  +  if {[file exists $zFile]} {
   118    118       set fd [open $zFile]
   119    119       fconfigure $fd -translation binary -encoding binary
          120  +
          121  +    if {[file size $zFile]<=$::sqlite_pending_byte || $zFile != "test.db"} {
   120    122       set zData [read $fd]
          123  +    } else {
          124  +      set zData [read $fd $::sqlite_pending_byte]
          125  +      append zData [string repeat x 512]
          126  +      seek $fd [expr $::sqlite_pending_byte+512] start
          127  +      append zData [read $fd]
          128  +    }
          129  +
   121    130       close $fd
   122    131     }
   123    132     return $zData
   124    133   }
   125    134   proc write_file {zFile zData} {
   126    135     set fd [open $zFile w]
   127    136     fconfigure $fd -translation binary -encoding binary