Index: test/badutf2.test ================================================================== --- test/badutf2.test +++ test/badutf2.test @@ -96,16 +96,22 @@ set res [ sqlite3_exec db $sql ] lindex [ lindex $res 1] 1 } $uval } - do_test badutf2-4.1.$i { - sqlite3_reset $S - sqlite3_bind_text $S 1 $xstr $len - sqlite3_step $S - utf8_to_ustr2 [ sqlite3_column_text $S 0 ] - } $ustr + # Tcl 8.7 and later do automatic bad-utf8 correction for + # characters 0x80 thru 0x9f so test case 5 does not work here. + if {$i==5 && $tcl_version>=8.7} { + # no-op + } else { + do_test badutf2-4.1.$i { + sqlite3_reset $S + sqlite3_bind_text $S 1 $xstr $len + sqlite3_step $S + utf8_to_ustr2 [ sqlite3_column_text $S 0 ] + } $ustr + } ifcapable debug { do_test badutf2-5.1.$i { utf8_to_utf8 $uval } $u2u Index: test/journal3.test ================================================================== --- test/journal3.test +++ test/journal3.test @@ -36,10 +36,13 @@ 3 00600 4 00755 } { db close #set effective [format %.5o [expr $permissions & ~$umask]] + if {$tcl_version>=8.7} { + regsub {^00} $permissions {0o} permissions + } set effective $permissions do_test journal3-1.2.$tn.1 { catch { forcedelete test.db-journal } file attributes test.db -permissions $permissions file attributes test.db -permissions Index: test/shell1.test ================================================================== --- test/shell1.test +++ test/shell1.test @@ -1020,10 +1020,12 @@ # cannot be used here. # if {$i==0x0D || ($tcl_platform(platform)=="windows" && $i==0x1A)} { continue } + # Tcl 8.7 maps 0x80 through 0x9f into valid UTF8. So skip those tests. + if {$i>=0x80 && $i<=0x9f} continue if {$i>=0xE0 && $tcl_platform(os)=="OpenBSD"} continue if {$i>=0xE0 && $i<=0xEF && $tcl_platform(os)=="Linux"} continue set hex [format %02X $i] set char [subst \\x$hex]; set oldChar $char set escapes [list] Index: test/wal2.test ================================================================== --- test/wal2.test +++ test/wal2.test @@ -1083,11 +1083,11 @@ 4 00755 } { set effective [format %.5o [expr $permissions & ~$umask]] do_test wal2-12.2.$tn.1 { file attributes test.db -permissions $permissions - file attributes test.db -permissions + string map {o 0} [file attributes test.db -permissions] } $permissions do_test wal2-12.2.$tn.2 { list [file exists test.db-wal] [file exists test.db-shm] } {0 0} do_test wal2-12.2.$tn.3 { @@ -1094,11 +1094,12 @@ sqlite3 db test.db execsql { INSERT INTO tx DEFAULT VALUES } list [file exists test.db-wal] [file exists test.db-shm] } {1 1} do_test wal2-12.2.$tn.4 { - list [file attr test.db-wal -perm] [file attr test.db-shm -perm] + set x [list [file attr test.db-wal -perm] [file attr test.db-shm -perm]] + string map {o 0} $x } [list $effective $effective] do_test wal2-12.2.$tn.5 { db close list [file exists test.db-wal] [file exists test.db-shm] } {0 0} @@ -1152,10 +1153,11 @@ file attr test.db-shm -perm $shm_perm set L [file attr test.db -perm] lappend L [file attr test.db-wal -perm] lappend L [file attr test.db-shm -perm] + string map {o 0} $L } [list $db_perm $wal_perm $shm_perm] # If $can_open is true, then it should be possible to open a database # handle. Otherwise, if $can_open is 0, attempting to open the db # handle throws an "unable to open database file" exception.