summaryrefslogtreecommitdiffstats
path: root/tests/cmdAH.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-08 19:58:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-08 19:58:08 (GMT)
commit7ed7017d94b407f12d57a464cd46a4bf1f2f976b (patch)
treed3d71271f374bf546c87b67353e476740226ae92 /tests/cmdAH.test
parent5cf1eed9106acd1a6e751b414506b0e38f6a79a7 (diff)
downloadtcl-7ed7017d94b407f12d57a464cd46a4bf1f2f976b.zip
tcl-7ed7017d94b407f12d57a464cd46a4bf1f2f976b.tar.gz
tcl-7ed7017d94b407f12d57a464cd46a4bf1f2f976b.tar.bz2
Add "notWsl" test constraints. Clean up many testcases
Diffstat (limited to 'tests/cmdAH.test')
-rw-r--r--tests/cmdAH.test17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index bb3ad98..8d36594 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -4,8 +4,8 @@
# commands. Sourcing this file into Tcl runs the tests and generates output
# for errors. No output means no errors were found.
#
-# Copyright (c) 1996-1998 by Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright (c) 1996-1998 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -30,6 +30,7 @@ testConstraint linkDirectory [expr {
($::tcl_platform(osVersion) >= 5.0
&& [lindex [file system [temporaryDirectory]] 1] eq "NTFS")
}]
+testConstraint notWsl [expr {[llength [array names ::env *WSL*]] == 0}]
global env
set cmdAHwd [pwd]
@@ -148,10 +149,10 @@ test cmdAH-2.6.2 {cd} -constraints {unix nonPortable} -setup {
test cmdAH-2.6.3 {Tcl_CdObjCmd, bug #3118489} -setup {
set dir [pwd]
} -returnCodes error -body {
- cd .\0
+ cd .\x00
} -cleanup {
cd $dir
-} -match glob -result "couldn't change working directory to \".\0\": *"
+} -match glob -result "couldn't change working directory to \".\x00\": *"
test cmdAH-2.7 {Tcl_ConcatObjCmd} {
concat
} {}
@@ -261,7 +262,7 @@ test cmdAH-6.3 {Tcl_FileObjCmd: volumes} -constraints unix -body {
test cmdAH-6.4 {Tcl_FileObjCmd: volumes} -constraints win -body {
set volumeList [string tolower [file volumes]]
set element [lsearch -exact $volumeList "c:/"]
- list [expr {$element>-1}] [glob -nocomplain [lindex $volumeList $element]*]
+ list [expr {$element>=0}] [glob -nocomplain [lindex $volumeList $element]*]
} -match glob -result {1 *}
# attributes
@@ -849,7 +850,7 @@ test cmdAH-16.2 {Tcl_FileObjCmd: readable} {
-result 1
}
test cmdAH-16.3 {Tcl_FileObjCmd: readable} {
- -constraints {unix notRoot testchmod}
+ -constraints {unix notRoot testchmod notWsl}
-setup {testchmod 0o333 $gorpfile}
-body {file readable $gorpfile}
-result 0
@@ -882,7 +883,7 @@ set gorpfile [makeFile abcde gorp.file]
test cmdAH-18.1 {Tcl_FileObjCmd: executable} -returnCodes error -body {
file executable a b
} -result {wrong # args: should be "file executable name"}
-test cmdAH-18.2 {Tcl_FileObjCmd: executable} {notRoot} {
+test cmdAH-18.2 {Tcl_FileObjCmd: executable} {notRoot notWsl} {
file executable $gorpfile
} 0
test cmdAH-18.3 {Tcl_FileObjCmd: executable} {unix testchmod} {
@@ -1430,7 +1431,7 @@ test cmdAH-28.4 {Tcl_FileObjCmd: stat} -setup {
file stat $gorpfile stat
list $stat(nlink) $stat(size) $stat(type)
} -result {1 12 file}
-test cmdAH-28.5 {Tcl_FileObjCmd: stat} -constraints {unix} -setup {
+test cmdAH-28.5 {Tcl_FileObjCmd: stat} -constraints {unix notWsl} -setup {
unset -nocomplain stat
} -body {
file stat $gorpfile stat