From 38555b60a2647d88236a922f72741a3f4611ccd2 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Thu, 9 Mar 2023 02:47:53 +0000 Subject: winFCmd-1.24 has different error code on Win 11 --- tests/winFCmd.test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/winFCmd.test b/tests/winFCmd.test index b146253..83dfbf7 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -286,8 +286,9 @@ test winFCmd-1.23 {TclpRenameFile: move dir into self} -setup { test winFCmd-1.24 {TclpRenameFile: move a root dir} -setup { cleanup } -constraints {win testfile} -body { + # Error code depends on Windows version testfile mv / c:/ -} -returnCodes error -result EINVAL +} -returnCodes error -result {^(EINVAL|ENOENT)$} -match regexp test winFCmd-1.25 {TclpRenameFile: cross file systems} -setup { cleanup } -constraints {win cdrom testfile} -body { -- cgit v0.12 From a1fb5545852518890326ddcf62f18e05de2425e3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Mar 2023 09:39:59 +0000 Subject: Fix tests/tcltest.test testcases (missing "namespace import") --- tests/tcltest.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcltest.test b/tests/tcltest.test index 750a20d..075cdf6 100644 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -17,9 +17,9 @@ # interfere with the [test] doing the testing. # -if {[catch {package require tcltest 2.1}]} { - puts stderr "Skipping tests in [info script]. tcltest 2.1 required." - return +if {"::tcltest" ni [namespace children]} { + package require tcltest 2.1 + namespace import -force ::tcltest::* } # File permissions broken on wsl without some "exotic" wsl configuration -- cgit v0.12 From 5b0be625362e6884c5276718ba911a3d292cf1c1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Mar 2023 10:08:02 +0000 Subject: Adapt 2 testcases (io-39.16/io-39.16a), showing that "-encoding" can be shortened to "-en", but not to "-e" (because there is -eofchar too) --- tests/io.test | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/io.test b/tests/io.test index ca7bd0c..6d556da 100644 --- a/tests/io.test +++ b/tests/io.test @@ -5607,13 +5607,20 @@ test io-39.15 {Tcl_SetChannelOption: -encoding, binary & utf-8} { close $f set x } \u7266 -test io-39.16 {Tcl_SetChannelOption: -encoding, errors} { +test io-39.16 {Tcl_SetChannelOption: -encoding (shortened to "-en"), errors} -body { file delete $path(test1) set f [open $path(test1) w] - set result [list [catch {fconfigure $f -encoding foobar} msg] $msg] + fconfigure $f -en foobar +} -cleanup { close $f - set result -} {1 {unknown encoding "foobar"}} +} -returnCodes 1 -result {unknown encoding "foobar"} +test io-39.16a {Tcl_SetChannelOption: -encoding (invalid shortening to "-e"), errors} -body { + file delete $path(test1) + set f [open $path(test1) w] + fconfigure $f -e foobar +} -cleanup { + close $f +} -returnCodes 1 -result {bad option "-e": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation} test io-39.17 {Tcl_SetChannelOption: -encoding, clearing CHANNEL_NEED_MORE_DATA} {stdio fileevent} { set f [open "|[list [interpreter] $path(cat)]" r+] fconfigure $f -encoding binary -- cgit v0.12