diff options
Diffstat (limited to 'tests/unixFCmd.test')
-rw-r--r-- | tests/unixFCmd.test | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test index e863d3b..32b3d68 100644 --- a/tests/unixFCmd.test +++ b/tests/unixFCmd.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unixFCmd.test,v 1.19 2003/05/14 19:21:25 das Exp $ +# RCS: @(#) $Id: unixFCmd.test,v 1.20 2004/05/19 20:15:32 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -229,14 +229,15 @@ test unixFCmd-14.2 {GetPermissionsAttribute} {unixOnly notRoot} { # Find a group that exists on this system, or else skip tests that require # groups -set ::tcltest::testConstraints(foundGroup) 0 +set foundgroup 0 if {$tcl_platform(platform) == "unix"} { catch { set groupList [exec groups] set group [lindex $groupList 0] - set ::tcltest::testConstraints(foundGroup) 1 + set foundgroup 1 } } +testConstraint foundGroup $foundgroup #groups hard to test test unixFCmd-15.1 {SetGroupAttribute - invalid group} {unixOnly notRoot} { @@ -326,16 +327,17 @@ test unixFCmd-18.1 {Unix pwd} {nonPortable unixOnly notRoot} { } {1 {error getting working directory name:}} # check whether -readonly attribute is supported -set ::tcltest::testConstraints(readonlyAttr) 0 +set roattr 0 if {$tcl_platform(platform) == "unix"} { catch {file delete -force -- foo.test} close [open foo.test w] catch { file attributes foo.test -readonly - set ::tcltest::testConstraints(readonlyAttr) 1 + set roattr 1 } file delete -force -- foo.test } +testConstraint readonlyAttr $roattr test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} {unixOnly notRoot readonlyAttr} { catch {file delete -force -- foo.test} |