aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2020-04-17 22:20:06 +1000
committerSteve Bennett <steveb@workware.net.au>2020-04-17 22:37:47 +1000
commit4bf0527e79858661da8da64aa937d18245520bb9 (patch)
tree32705f9319bf01f8fe1f310170a1a5f9d9ddb1a2
parentb081ba9fe23cb52fbd17a7f4635244c9ce3ff1fa (diff)
downloadjimtcl-4bf0527e79858661da8da64aa937d18245520bb9.zip
jimtcl-4bf0527e79858661da8da64aa937d18245520bb9.tar.gz
jimtcl-4bf0527e79858661da8da64aa937d18245520bb9.tar.bz2
tests: file tempfile: don't do path/template tests on windows
As Windows doesn't respect the path/template Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--tests/filecopy.test11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/filecopy.test b/tests/filecopy.test
index 0c0231e..36382c9 100644
--- a/tests/filecopy.test
+++ b/tests/filecopy.test
@@ -5,6 +5,8 @@ needs cmd file
needs cmd exec
needs cmd parray tclcompat
+testConstraint unix [expr {$tcl_platform(platform) eq "unix"}]
+
cd [file dirname [info script]]
file mkdir tempdir
@@ -75,19 +77,22 @@ test file-tempfile-1.1 {file tempfile - simple} {
set ret
} {1}
-test file-tempfile-1.2 {file tempfile with pattern} {
+# Note that Windows doesn't provide much control over the tempfile.
+# Only the first 3 chars of the pattern are used, so ignore these tests on that platform
+
+test file-tempfile-1.2 {file tempfile with pattern} unix {
set f [file tempfile /tmp/file-tempfile.XXXXXX]
set ret [file exists $f]
file delete $f
set ret
} {1}
-test file-tempfile-1.3 {file tempfile with invalid path} -body {
+test file-tempfile-1.3 {file tempfile with invalid path} -constraints unix -body {
set f [file tempfile /doesnotexist/file-tempfile.XXXXXX]
puts $f
set ret [file exists $f]
file delete $f
- set ret
+ set $f
} -returnCodes error -match glob -result {/doesnotexist/file-tempfile.*}
file delete tempfile