diff options
author | das <das> | 2008-10-23 12:19:02 (GMT) |
---|---|---|
committer | das <das> | 2008-10-23 12:19:02 (GMT) |
commit | 6fc24954200254fd28602e4e30340c3ad5c6680a (patch) | |
tree | dc2e0aa186c8be8291b34d14a4629d113acea732 /tests | |
parent | 6ca3ccd39cb05badbe9504755fc01940035b513e (diff) | |
download | tcl-6fc24954200254fd28602e4e30340c3ad5c6680a.zip tcl-6fc24954200254fd28602e4e30340c3ad5c6680a.tar.gz tcl-6fc24954200254fd28602e4e30340c3ad5c6680a.tar.bz2 |
only create test.dat file on windows, it is never used on unix and creation
may fail due to insufficient permissions
Diffstat (limited to 'tests')
-rw-r--r-- | tests/winFile.test | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/winFile.test b/tests/winFile.test index 0cefcb5..5f69921 100644 --- a/tests/winFile.test +++ b/tests/winFile.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: winFile.test,v 1.20 2007/12/14 13:52:55 patthoyts Exp $ +# RCS: @(#) $Id: winFile.test,v 1.20.2.1 2008/10/23 12:19:02 das Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -162,13 +162,15 @@ proc test_access {fname read writ} { } } -# Create the test file -# NOTE: [tcltest::makeFile] not used. Presumably to force file -# creation in a particular filesystem? If not, try [makeFile] -# in a -setup script. -set fname test.dat -file delete $fname -close [open $fname w] +if {[testConstraint win]} { + # Create the test file + # NOTE: [tcltest::makeFile] not used. Presumably to force file + # creation in a particular filesystem? If not, try [makeFile] + # in a -setup script. + set fname test.dat + file delete $fname + close [open $fname w] +} test winFile-4.0 { Enhanced NTFS user/group permissions: test no acccess @@ -234,7 +236,9 @@ test winFile-4.4 { test_access $fname 1 1 } -result {} -file delete $fname +if {[testConstraint win]} { + file delete $fname +} # cleanup cleanupTests |