SQLite

Check-in [b0f4796306]
Login

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

Overview
Comment:Adjust filename globbing in backcompat.test for Windows.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b0f4796306a2cb11d6897d5c33f5da05c7473e07
User & Date: shaneh 2010-08-19 18:05:46.000
Context
2010-08-20
09:14
Fix the sqlite3_release_memory() interface so that it does not attempt to free SQLITE_CONFIG_PAGECACHE memory. (check-in: 0426cd62d5 user: drh 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)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/backcompat.test.
31
32
33
34
35
36
37



38
39
40
41
42
43
44

# Search for binaries to test against. Any executable files that match
# our naming convention are assumed to be testfixture binaries to test
# against.
#
set binaries [list]
set pattern "[file tail [info nameofexec]]*"



foreach file [glob $pattern] {
  if {[file executable $file]} {lappend binaries $file}
}
if {[llength $binaries]==0} {
  puts "WARNING: No binaries to test against. No tests have been run."
  finish_test
  return







>
>
>







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

# Search for binaries to test against. Any executable files that match
# our naming convention are assumed to be testfixture binaries to test
# against.
#
set binaries [list]
set pattern "[file tail [info nameofexec]]*"
if {$tcl_platform(platform)=="windows"} {
  set pattern [string map {\.exe {}} $pattern]
}
foreach file [glob $pattern] {
  if {[file executable $file]} {lappend binaries $file}
}
if {[llength $binaries]==0} {
  puts "WARNING: No binaries to test against. No tests have been run."
  finish_test
  return
88
89
90
91
92
93
94

95
96
97
98
99
100
101
proc do_allbackcompat_test {script} {

  foreach bin $::binaries {
    set nErr [set_test_counter errors]
    foreach dir {0 1} {

      set bintag [string map {testfixture {}} $bin]

      if {$bintag == ""} {set bintag self}
      set ::bcname ".$bintag.$dir."

      rename do_test _do_test
      proc do_test {nm sql res} {
        set nm [regsub {\.} $nm $::bcname]
        uplevel [list _do_test $nm $sql $res]







>







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
proc do_allbackcompat_test {script} {

  foreach bin $::binaries {
    set nErr [set_test_counter errors]
    foreach dir {0 1} {

      set bintag [string map {testfixture {}} $bin]
      set bintag [string map {\.exe {}} $bintag]
      if {$bintag == ""} {set bintag self}
      set ::bcname ".$bintag.$dir."

      rename do_test _do_test
      proc do_test {nm sql res} {
        set nm [regsub {\.} $nm $::bcname]
        uplevel [list _do_test $nm $sql $res]
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

  do_test backcompat-1.2.3 { sql1 {
    BEGIN;
      UPDATE t1 SET a = randomblob(500);
  } } {}
  set data [read_file_system]

  set f "test.db-journal[incr x]"
  file copy -force test.db-journal $f

  do_test backcompat-1.2.4 { sql1 { COMMIT } } {}

  set same [expr {[sql2 {SELECT md5sum(a), md5sum(b) FROM t1}] == $cksum2}]
  do_test backcompat-1.2.5 [list set {} $same] 0

  code1 { db close }
  code2 { db close }







<
<
<







201
202
203
204
205
206
207



208
209
210
211
212
213
214

  do_test backcompat-1.2.3 { sql1 {
    BEGIN;
      UPDATE t1 SET a = randomblob(500);
  } } {}
  set data [read_file_system]




  do_test backcompat-1.2.4 { sql1 { COMMIT } } {}

  set same [expr {[sql2 {SELECT md5sum(a), md5sum(b) FROM t1}] == $cksum2}]
  do_test backcompat-1.2.5 [list set {} $same] 0

  code1 { db close }
  code2 { db close }