From 2ffcfc525bbdf699b316eadff19d2f55139b608a Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 3 Nov 2023 13:23:08 +0000 Subject: test constraint housekeeping --- tests/winFCmd.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 3d0a9e0..fe50043 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -50,7 +50,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*] @@ -500,7 +500,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 -- cgit v0.12 From c544d4e618dab48c41c1861efe9e6acc221c8fc8 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 3 Nov 2023 16:53:11 +0000 Subject: Missing test constraints --- tests/utfext.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- cgit v0.12