diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2023-11-06 15:24:37 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2023-11-06 15:24:37 (GMT) |
commit | 44db33ce5944984f3308f258787d5aea1d172827 (patch) | |
tree | aa1eed66b610f8a021564cd2a471084eaf821e56 /tests | |
parent | 3928c1068a7075ee5c025b58033fbeb21bb4bb61 (diff) | |
parent | 0f91665f15fa0bdec4a9f472680f7d123a691067 (diff) | |
download | tcl-44db33ce5944984f3308f258787d5aea1d172827.zip tcl-44db33ce5944984f3308f258787d5aea1d172827.tar.gz tcl-44db33ce5944984f3308f258787d5aea1d172827.tar.bz2 |
Merge core-8-branch
Diffstat (limited to 'tests')
-rw-r--r-- | tests/io.test | 2 | ||||
-rw-r--r-- | tests/utfext.test | 8 | ||||
-rw-r--r-- | tests/winFCmd.test | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/io.test b/tests/io.test index 7826be4..997dadd 100644 --- a/tests/io.test +++ b/tests/io.test @@ -9299,7 +9299,7 @@ test io-strict-multibyte-eof { } -match glob -result {1 {error reading "*":\ invalid or incomplete multibyte or wide character} {}} -test io-75.9 {unrepresentable character write passes and is replaced by ?} -setup { +test io-75.9 {unrepresentable character write throws error in strict profile} -setup { set fn [makeFile {} io-75.9] set f [open $fn w+] fconfigure $f -encoding iso8859-1 -profile strict diff --git a/tests/utfext.test b/tests/utfext.test index ce50666..d2da50b 100644 --- a/tests/utfext.test +++ b/tests/utfext.test @@ -41,12 +41,12 @@ proc testbasic {direction enc hexin hexout {flags {start end}}} { set result [string range "$out$filler" 0 $dstlen-1] test $cmd-$enc-$hexin-[join $flags -] "$cmd - $enc - $hexin - $flags" -body \ [list testencoding $cmd $enc $in $flags {} $dstlen] \ - -result [list ok {} $result] + -result [list ok {} $result] -constraints testencoding foreach profile [encoding profiles] { set flags2 [linsert $flags end profile$profile] test $cmd-$enc-$hexin-[join $flags2 -] "$cmd - $enc - $hexin - $flags" -body \ [list testencoding $cmd $enc $in $flags2 {} $dstlen] \ - -result [list ok {} $result] + -result [list ok {} $result] -constraints testencoding } } @@ -67,7 +67,7 @@ foreach {enc utfhex hex} $utfExtMap { # Test for insufficient space test xx-bufferoverflow {buffer overflow Tcl_ExternalToUtf} -body { testencoding Tcl_UtfToExternal ucs-2 A {start end} {} 1 -} -result [list nospace {} \xFF] +} -result [list nospace {} \xFF] -constraints testencoding # Another bug - char limit not obeyed # % set cv 2 @@ -79,7 +79,7 @@ test TableToUtf-bug-5be203d6ca {Bug 5be203d6ca - truncated prefix in table encod lassign [testencoding Tcl_ExternalToUtf shiftjis $src {start} 0 16 srcRead dstWritten charsWritten] buf set result [list [testencoding Tcl_ExternalToUtf shiftjis $src {start} 0 16 srcRead dstWritten charsWritten] $srcRead $dstWritten $charsWritten] lappend result {*}[list [testencoding Tcl_ExternalToUtf shiftjis [string range $src $srcRead end] {end} 0 10 srcRead dstWritten charsWritten] $srcRead $dstWritten $charsWritten] -} -result [list [list multibyte 0 \xEF\xBC\x90\xEF\xBC\x91\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF] 4 6 2 [list ok 0 \xC2\x82\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF] 1 2 1] +} -result [list [list multibyte 0 \xEF\xBC\x90\xEF\xBC\x91\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF] 4 6 2 [list ok 0 \xC2\x82\x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF] 1 2 1] -constraints testencoding ::tcltest::cleanupTests diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 9b5e67e..ac5ae4e 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -48,7 +48,7 @@ proc contents {file} { proc cleanupRecurse {args} { # Assumes no loops via links! # Need to change permissions BEFORE deletion - testchmod 0o777 {*}$args + catch {testchmod 0o777 {*}$args} foreach victim $args { if {[file isdirectory $victim]} { cleanupRecurse {*}[glob -nocomplain -directory $victim td* tf* Test*] @@ -454,7 +454,7 @@ test winFCmd-2.11 {TclpCopyFile: CopyFile succeeds} -setup { } -result {tf1 tf1} test winFCmd-2.12 {TclpCopyFile: CopyFile succeeds} -setup { cleanup -} -constraints {win testfile} -body { +} -constraints {win testfile testchmod} -body { createfile tf1 tf1 file attribute tf1 -readonly 1 testfile cp tf1 tf2 |