diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-08 19:58:08 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-08 19:58:08 (GMT) |
commit | 7ed7017d94b407f12d57a464cd46a4bf1f2f976b (patch) | |
tree | d3d71271f374bf546c87b67353e476740226ae92 /tests/tcltest.test | |
parent | 5cf1eed9106acd1a6e751b414506b0e38f6a79a7 (diff) | |
download | tcl-7ed7017d94b407f12d57a464cd46a4bf1f2f976b.zip tcl-7ed7017d94b407f12d57a464cd46a4bf1f2f976b.tar.gz tcl-7ed7017d94b407f12d57a464cd46a4bf1f2f976b.tar.bz2 |
Add "notWsl" test constraints. Clean up many testcases
Diffstat (limited to 'tests/tcltest.test')
-rw-r--r-- | tests/tcltest.test | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/tcltest.test b/tests/tcltest.test index 9da14de..750a20d 100644 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -2,8 +2,8 @@ # built-in commands. Sourcing this file into Tcl runs the tests and # generates output for errors. No output means no errors were found. # -# Copyright (c) 1998-1999 by Scriptics Corporation. -# Copyright (c) 2000 by Ajuba Solutions +# Copyright (c) 1998-1999 Scriptics Corporation. +# Copyright (c) 2000 Ajuba Solutions # All rights reserved. # Note that there are several places where the value of @@ -22,6 +22,9 @@ if {[catch {package require tcltest 2.1}]} { return } +# File permissions broken on wsl without some "exotic" wsl configuration +testConstraint notWsl [expr {[llength [array names ::env *WSL*]] == 0}] + namespace eval ::tcltest::test { namespace import ::tcltest::* @@ -306,7 +309,7 @@ test tcltest-5.3 {testConstraint - constraint empty (tcltest::safeFetch)} { #} test tcltest-5.5 {InitConstraints: list of built-in constraints} \ - -constraints {!singleTestInterp} \ + -constraints {!singleTestInterp notWsl} \ -setup {tcltest::InitConstraints} \ -body { lsort [array names ::tcltest::testConstraints] } \ -result [lsort { @@ -556,7 +559,7 @@ switch -- $::tcl_platform(platform) { } } test tcltest-8.3 {tcltest a.tcl -tmpdir notReadableDir} { - -constraints {unix notRoot} + -constraints {unix notRoot notWsl} -body { child msg $a -tmpdir $notReadableDir return $msg @@ -572,7 +575,7 @@ testConstraint notFAT [expr { }] # FAT/NTFS permissions are fairly hopeless; ignore this test if that FS is used test tcltest-8.4 {tcltest a.tcl -tmpdir notWriteableDir} { - -constraints {unixOrWin notRoot notFAT} + -constraints {unixOrWin notRoot notFAT notWsl} -body { child msg $a -tmpdir $notWriteableDir return $msg @@ -645,7 +648,7 @@ test tcltest-8.11 {tcltest a.tcl -testdir thisdirectoryisafile} { -result {*not a directory*} } test tcltest-8.12 {tcltest a.tcl -testdir notReadableDir} { - -constraints {unix notRoot} + -constraints {unix notRoot notWsl} -body { child msg $a -testdir $notReadableDir return $msg |