/ Check-in [7b771405]
Login

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

Overview
Comment:Test case changes so that they work with both Tcl8.6 and Tcl8.7.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7b771405a9adc3ec191156be4ebe7122f4c698d88d69ae2134c75acb8d8feebb
User & Date: drh 2019-04-12 16:25:42
Context
2019-04-13
04:01
Enforce the SQLITE_LIMIT_COLUMN limit on virtual tables. check-in: 0b6ae032 user: drh tags: trunk
2019-04-12
20:33
Add the socketvfs test extension. Leaf check-in: f5b3ce94 user: dan tags: socketvfs
16:25
Test case changes so that they work with both Tcl8.6 and Tcl8.7. check-in: 7b771405 user: drh tags: trunk
13:40
Tweaks to wapptest.tcl: Ensure that the "Debug" checkbox is disabled unless the app is in "config" state, and have Debug variants run "test" instead of "fulltest". check-in: dd248c18 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/badutf2.test.

    94     94       do_test badutf2-3.1.$i {
    95     95         set sql "SELECT hex('$hstr') AS x;"
    96     96         set res [ sqlite3_exec db $sql ]
    97     97         lindex [ lindex $res 1] 1
    98     98       } $uval
    99     99     }
   100    100   
   101         -  do_test badutf2-4.1.$i {
   102         -    sqlite3_reset $S
   103         -    sqlite3_bind_text $S 1 $xstr $len
   104         -    sqlite3_step $S
   105         -    utf8_to_ustr2 [ sqlite3_column_text $S 0 ]
   106         -  } $ustr
          101  +  # Tcl 8.7 and later do automatic bad-utf8 correction for
          102  +  # characters 0x80 thru 0x9f so test case 5 does not work here.
          103  +  if {$i==5 && $tcl_version>=8.7} {
          104  +     # no-op
          105  +  } else {
          106  +    do_test badutf2-4.1.$i {
          107  +      sqlite3_reset $S
          108  +      sqlite3_bind_text $S 1 $xstr $len
          109  +      sqlite3_step $S
          110  +      utf8_to_ustr2 [ sqlite3_column_text $S 0 ]
          111  +    } $ustr
          112  +  }
   107    113   
   108    114     ifcapable debug {
   109    115       do_test badutf2-5.1.$i {
   110    116         utf8_to_utf8 $uval
   111    117       } $u2u
   112    118     }
   113    119   

Changes to test/journal3.test.

    34     34      1 00644
    35     35      2 00666
    36     36      3 00600
    37     37      4 00755
    38     38     } {
    39     39       db close
    40     40       #set effective [format %.5o [expr $permissions & ~$umask]]
           41  +    if {$tcl_version>=8.7} {
           42  +       regsub {^00} $permissions {0o} permissions
           43  +    }
    41     44       set effective $permissions
    42     45       do_test journal3-1.2.$tn.1 {
    43     46         catch { forcedelete test.db-journal }
    44     47         file attributes test.db -permissions $permissions
    45     48         file attributes test.db -permissions
    46     49       } $permissions
    47     50       do_test journal3-1.2.$tn.2 { file exists test.db-journal } {0}

Changes to test/shell1.test.

  1018   1018       #       command channels opened for it as textual ones), the carriage
  1019   1019       #       return character (and on Windows, the end-of-file character)
  1020   1020       #       cannot be used here.
  1021   1021       #
  1022   1022       if {$i==0x0D || ($tcl_platform(platform)=="windows" && $i==0x1A)} {
  1023   1023         continue
  1024   1024       }
         1025  +    # Tcl 8.7 maps 0x80 through 0x9f into valid UTF8.  So skip those tests.
         1026  +    if {$i>=0x80 && $i<=0x9f} continue
  1025   1027       if {$i>=0xE0 && $tcl_platform(os)=="OpenBSD"}  continue
  1026   1028       if {$i>=0xE0 && $i<=0xEF && $tcl_platform(os)=="Linux"}  continue
  1027   1029       set hex [format %02X $i]
  1028   1030       set char [subst \\x$hex]; set oldChar $char
  1029   1031       set escapes [list]
  1030   1032       if {$tcl_platform(platform)=="windows"} {
  1031   1033         #

Changes to test/wal2.test.

  1081   1081      2 00666
  1082   1082      3 00600
  1083   1083      4 00755
  1084   1084     } {
  1085   1085       set effective [format %.5o [expr $permissions & ~$umask]]
  1086   1086       do_test wal2-12.2.$tn.1 {
  1087   1087         file attributes test.db -permissions $permissions
  1088         -      file attributes test.db -permissions
         1088  +      string map {o 0} [file attributes test.db -permissions]
  1089   1089       } $permissions
  1090   1090       do_test wal2-12.2.$tn.2 {
  1091   1091         list [file exists test.db-wal] [file exists test.db-shm]
  1092   1092       } {0 0}
  1093   1093       do_test wal2-12.2.$tn.3 {
  1094   1094         sqlite3 db test.db
  1095   1095         execsql { INSERT INTO tx DEFAULT VALUES }
  1096   1096         list [file exists test.db-wal] [file exists test.db-shm]
  1097   1097       } {1 1}
  1098   1098       do_test wal2-12.2.$tn.4 {
  1099         -      list [file attr test.db-wal -perm] [file attr test.db-shm -perm]
         1099  +      set x [list [file attr test.db-wal -perm] [file attr test.db-shm -perm]]
         1100  +      string map {o 0} $x
  1100   1101       } [list $effective $effective]
  1101   1102       do_test wal2-12.2.$tn.5 {
  1102   1103         db close
  1103   1104         list [file exists test.db-wal] [file exists test.db-shm]
  1104   1105       } {0 0}
  1105   1106     }
  1106   1107   }
................................................................................
  1150   1151         file attr test.db     -perm $db_perm
  1151   1152         file attr test.db-wal -perm $wal_perm
  1152   1153         file attr test.db-shm -perm $shm_perm
  1153   1154   
  1154   1155         set     L [file attr test.db -perm]
  1155   1156         lappend L [file attr test.db-wal -perm]
  1156   1157         lappend L [file attr test.db-shm -perm]
         1158  +      string map {o 0} $L
  1157   1159       } [list $db_perm $wal_perm $shm_perm]
  1158   1160   
  1159   1161       # If $can_open is true, then it should be possible to open a database
  1160   1162       # handle. Otherwise, if $can_open is 0, attempting to open the db
  1161   1163       # handle throws an "unable to open database file" exception.
  1162   1164       #
  1163   1165       set r(1) {0 ok}