summaryrefslogtreecommitdiffstats
path: root/tests/unixFCmd.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-06-23 15:36:52 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-06-23 15:36:52 (GMT)
commit917f6e364bb4aaeed6b6e109ce16525d58091193 (patch)
tree62ce3a9ba3ee31456f0967b7e5e3c7b35c33dd5e /tests/unixFCmd.test
parent5ce4f325726f9d4a32b7499cc8a0ff0d81a2dc48 (diff)
downloadtcl-917f6e364bb4aaeed6b6e109ce16525d58091193.zip
tcl-917f6e364bb4aaeed6b6e109ce16525d58091193.tar.gz
tcl-917f6e364bb4aaeed6b6e109ce16525d58091193.tar.bz2
Standardize some use of test constraints onto names that are documented
Diffstat (limited to 'tests/unixFCmd.test')
-rw-r--r--tests/unixFCmd.test92
1 files changed, 46 insertions, 46 deletions
diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test
index 32b3d68..bdead08 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.20 2004/05/19 20:15:32 dkf Exp $
+# RCS: @(#) $Id: unixFCmd.test,v 1.21 2004/06/23 15:36:58 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -59,7 +59,7 @@ proc cleanup {args} {
}
}
-test unixFCmd-1.1 {TclpRenameFile: EACCES} {unixOnly notRoot} {
+test unixFCmd-1.1 {TclpRenameFile: EACCES} {unix notRoot} {
cleanup
file mkdir td1/td2/td3
file attributes td1/td2 -permissions 0000
@@ -67,29 +67,29 @@ test unixFCmd-1.1 {TclpRenameFile: EACCES} {unixOnly notRoot} {
file attributes td1/td2 -permissions 0755
set msg
} {1 {error renaming "td1/td2/td3": permission denied}}
-test unixFCmd-1.2 {TclpRenameFile: EEXIST} {unixOnly notRoot} {
+test unixFCmd-1.2 {TclpRenameFile: EEXIST} {unix notRoot} {
cleanup
file mkdir td1/td2
file mkdir td2
list [catch {file rename td2 td1} msg] $msg
} {1 {error renaming "td2" to "td1/td2": file already exists}}
-test unixFCmd-1.3 {TclpRenameFile: EINVAL} {unixOnly notRoot} {
+test unixFCmd-1.3 {TclpRenameFile: EINVAL} {unix notRoot} {
cleanup
file mkdir td1
list [catch {file rename td1 td1} msg] $msg
} {1 {error renaming "td1" to "td1/td1": trying to rename a volume or move a directory into itself}}
-test unixFCmd-1.4 {TclpRenameFile: EISDIR} {emptyTest unixOnly notRoot} {
+test unixFCmd-1.4 {TclpRenameFile: EISDIR} {emptyTest unix notRoot} {
# can't make it happen
} {}
-test unixFCmd-1.5 {TclpRenameFile: ENOENT} {unixOnly notRoot} {
+test unixFCmd-1.5 {TclpRenameFile: ENOENT} {unix notRoot} {
cleanup
file mkdir td1
list [catch {file rename td2 td1} msg] $msg
} {1 {error renaming "td2": no such file or directory}}
-test unixFCmd-1.6 {TclpRenameFile: ENOTDIR} {emptyTest unixOnly notRoot} {
+test unixFCmd-1.6 {TclpRenameFile: ENOTDIR} {emptyTest unix notRoot} {
# can't make it happen
} {}
-test unixFCmd-1.7 {TclpRenameFile: EXDEV} {unixOnly notRoot} {
+test unixFCmd-1.7 {TclpRenameFile: EXDEV} {unix notRoot} {
cleanup
file mkdir foo/bar
file attr foo -perm 040555
@@ -100,12 +100,12 @@ test unixFCmd-1.7 {TclpRenameFile: EXDEV} {unixOnly notRoot} {
catch {file delete -force foo}
list $catchResult $msg
} {1 { permission denied}}
-test unixFCmd-1.8 {Checking EINTR Bug} {unixOnly notRoot nonPortable} {
+test unixFCmd-1.8 {Checking EINTR Bug} {unix notRoot nonPortable} {
testalarm
after 2000
list [testgotsig] [testgotsig]
} {1 0}
-test unixFCmd-1.9 {Checking EINTR Bug} {unixOnly notRoot nonPortable} {
+test unixFCmd-1.9 {Checking EINTR Bug} {unix notRoot nonPortable} {
cleanup
set f [open tfalarm w]
puts $f {
@@ -121,13 +121,13 @@ test unixFCmd-1.9 {Checking EINTR Bug} {unixOnly notRoot nonPortable} {
list $line [testgotsig]
} {h 1}
test unixFCmd-2.1 {TclpCopyFile: target exists: lstat(dst) == 0} \
- {unixOnly notRoot} {
+ {unix notRoot} {
cleanup
close [open tf1 a]
close [open tf2 a]
file copy -force tf1 tf2
} {}
-test unixFCmd-2.2.1 {TclpCopyFile: src is symlink} {unixOnly notRoot dontCopyLinks} {
+test unixFCmd-2.2.1 {TclpCopyFile: src is symlink} {unix notRoot dontCopyLinks} {
# copying links should end up with real files
cleanup
close [open tf1 a]
@@ -135,7 +135,7 @@ test unixFCmd-2.2.1 {TclpCopyFile: src is symlink} {unixOnly notRoot dontCopyLin
file copy tf2 tf3
file type tf3
} {file}
-test unixFCmd-2.2.2 {TclpCopyFile: src is symlink} {unixOnly notRoot} {
+test unixFCmd-2.2.2 {TclpCopyFile: src is symlink} {unix notRoot} {
# copying links should end up with the links copied
cleanup
close [open tf1 a]
@@ -143,7 +143,7 @@ test unixFCmd-2.2.2 {TclpCopyFile: src is symlink} {unixOnly notRoot} {
file copy tf2 tf3
file type tf3
} {link}
-test unixFCmd-2.3 {TclpCopyFile: src is block} {unixOnly notRoot} {
+test unixFCmd-2.3 {TclpCopyFile: src is block} {unix notRoot} {
cleanup
set null "/dev/null"
while {[file type $null] != "characterSpecial"} {
@@ -151,7 +151,7 @@ test unixFCmd-2.3 {TclpCopyFile: src is block} {unixOnly notRoot} {
}
# file copy $null tf1
} {}
-test unixFCmd-2.4 {TclpCopyFile: src is fifo} {unixOnly notRoot} {
+test unixFCmd-2.4 {TclpCopyFile: src is fifo} {unix notRoot} {
cleanup
if [catch {exec mknod tf1 p}] {
list 1
@@ -160,7 +160,7 @@ test unixFCmd-2.4 {TclpCopyFile: src is fifo} {unixOnly notRoot} {
expr {"[file type tf1]" == "[file type tf2]"}
}
} {1}
-test unixFCmd-2.5 {TclpCopyFile: copy attributes} {unixOnly notRoot} {
+test unixFCmd-2.5 {TclpCopyFile: copy attributes} {unix notRoot} {
cleanup
close [open tf1 a]
file attributes tf1 -permissions 0472
@@ -168,59 +168,59 @@ test unixFCmd-2.5 {TclpCopyFile: copy attributes} {unixOnly notRoot} {
file attributes tf2 -permissions
} 00472 ;# i.e. perms field of [exec ls -l tf2] is -r--rwx-w-
-test unixFCmd-3.1 {CopyFile not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-3.1 {CopyFile not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-4.1 {TclpDeleteFile not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-4.1 {TclpDeleteFile not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-5.1 {TclpCreateDirectory not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-5.1 {TclpCreateDirectory not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-6.1 {TclpCopyDirectory not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-6.1 {TclpCopyDirectory not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-7.1 {TclpRemoveDirectory not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-7.1 {TclpRemoveDirectory not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-8.1 {TraverseUnixTree not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-8.1 {TraverseUnixTree not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-9.1 {TraversalCopy not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-9.1 {TraversalCopy not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-10.1 {TraversalDelete not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-10.1 {TraversalDelete not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-11.1 {CopyFileAttrs not done} {emptyTest unixOnly notRoot} {
+test unixFCmd-11.1 {CopyFileAttrs not done} {emptyTest unix notRoot} {
} {}
-test unixFCmd-12.1 {GetGroupAttribute - file not found} {unixOnly notRoot} {
+test unixFCmd-12.1 {GetGroupAttribute - file not found} {unix notRoot} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -group} msg] $msg
} {1 {could not read "foo.test": no such file or directory}}
-test unixFCmd-12.2 {GetGroupAttribute - file found} {unixOnly notRoot} {
+test unixFCmd-12.2 {GetGroupAttribute - file found} {unix notRoot} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attributes foo.test -group}] [file delete -force -- foo.test]
} {0 {}}
-test unixFCmd-13.1 {GetOwnerAttribute - file not found} {unixOnly notRoot} {
+test unixFCmd-13.1 {GetOwnerAttribute - file not found} {unix notRoot} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -group} msg] $msg
} {1 {could not read "foo.test": no such file or directory}}
-test unixFCmd-13.2 {GetOwnerAttribute} {unixOnly notRoot} {
+test unixFCmd-13.2 {GetOwnerAttribute} {unix notRoot} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attributes foo.test -owner} msg] \
[string compare $msg $user] [file delete -force -- foo.test]
} {0 0 {}}
-test unixFCmd-14.1 {GetPermissionsAttribute - file not found} {unixOnly notRoot} {
+test unixFCmd-14.1 {GetPermissionsAttribute - file not found} {unix notRoot} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -permissions} msg] $msg
} {1 {could not read "foo.test": no such file or directory}}
-test unixFCmd-14.2 {GetPermissionsAttribute} {unixOnly notRoot} {
+test unixFCmd-14.2 {GetPermissionsAttribute} {unix notRoot} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attribute foo.test -permissions}] \
@@ -240,53 +240,53 @@ if {$tcl_platform(platform) == "unix"} {
testConstraint foundGroup $foundgroup
#groups hard to test
-test unixFCmd-15.1 {SetGroupAttribute - invalid group} {unixOnly notRoot} {
+test unixFCmd-15.1 {SetGroupAttribute - invalid group} {unix notRoot} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -group foozzz} msg] \
$msg [file delete -force -- foo.test]
} {1 {could not set group for file "foo.test": group "foozzz" does not exist} {}}
test unixFCmd-15.2 {SetGroupAttribute - invalid file} \
- {unixOnly notRoot foundGroup} {
+ {unix notRoot foundGroup} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -group $group} msg] $msg
} {1 {could not set group for file "foo.test": no such file or directory}}
#changing owners hard to do
-test unixFCmd-16.1 {SetOwnerAttribute - current owner} {unixOnly notRoot} {
+test unixFCmd-16.1 {SetOwnerAttribute - current owner} {unix notRoot} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attributes foo.test -owner $user} msg] \
$msg [string compare [file attributes foo.test -owner] $user] \
[file delete -force -- foo.test]
} {0 {} 0 {}}
-test unixFCmd-16.2 {SetOwnerAttribute - invalid file} {unixOnly notRoot} {
+test unixFCmd-16.2 {SetOwnerAttribute - invalid file} {unix notRoot} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -owner $user} msg] $msg
} {1 {could not set owner for file "foo.test": no such file or directory}}
-test unixFCmd-16.3 {SetOwnerAttribute - invalid owner} {unixOnly notRoot} {
+test unixFCmd-16.3 {SetOwnerAttribute - invalid owner} {unix notRoot} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -owner foozzz} msg] $msg
} {1 {could not set owner for file "foo.test": user "foozzz" does not exist}}
-test unixFCmd-17.1 {SetPermissionsAttribute} {unixOnly notRoot} {
+test unixFCmd-17.1 {SetPermissionsAttribute} {unix notRoot} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attributes foo.test -permissions 0000} msg] \
$msg [file attributes foo.test -permissions] \
[file delete -force -- foo.test]
} {0 {} 00000 {}}
-test unixFCmd-17.2 {SetPermissionsAttribute} {unixOnly notRoot} {
+test unixFCmd-17.2 {SetPermissionsAttribute} {unix notRoot} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -permissions 0000} msg] $msg
} {1 {could not set permissions for file "foo.test": no such file or directory}}
-test unixFCmd-17.3 {SetPermissionsAttribute} {unixOnly notRoot} {
+test unixFCmd-17.3 {SetPermissionsAttribute} {unix notRoot} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attributes foo.test -permissions foo} msg] $msg \
[file delete -force -- foo.test]
} {1 {unknown permission string format "foo"} {}}
-test unixFCmd-17.4 {SetPermissionsAttribute} {unixOnly notRoot} {
+test unixFCmd-17.4 {SetPermissionsAttribute} {unix notRoot} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attributes foo.test -permissions ---rwx} msg] $msg \
@@ -296,7 +296,7 @@ test unixFCmd-17.4 {SetPermissionsAttribute} {unixOnly notRoot} {
close [open foo.test w]
set ::i 4
proc permcheck {testnum permstr expected} {
- test $testnum {SetPermissionsAttribute} {unixOnly notRoot} {
+ test $testnum {SetPermissionsAttribute} {unix notRoot} {
file attributes foo.test -permissions $permstr
file attributes foo.test -permissions
} $expected
@@ -311,7 +311,7 @@ permcheck unixFCmd-17.11 --x--x--x 00111
permcheck unixFCmd-17.12 a+rwx 00777
file delete -force -- foo.test
-test unixFCmd-18.1 {Unix pwd} {nonPortable unixOnly notRoot} {
+test unixFCmd-18.1 {Unix pwd} {nonPortable unix notRoot} {
# This test is nonportable because SunOS generates a weird error
# message when the current directory isn't readable.
set cd [pwd]
@@ -339,18 +339,18 @@ if {$tcl_platform(platform) == "unix"} {
}
testConstraint readonlyAttr $roattr
-test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} {unixOnly notRoot readonlyAttr} {
+test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} {unix notRoot readonlyAttr} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -readonly} msg] $msg
} {1 {could not read "foo.test": no such file or directory}}
-test unixFCmd-19.2 {GetReadOnlyAttribute} {unixOnly notRoot readonlyAttr} {
+test unixFCmd-19.2 {GetReadOnlyAttribute} {unix notRoot readonlyAttr} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attribute foo.test -readonly} msg] $msg \
[file delete -force -- foo.test]
} {0 0 {}}
-test unixFCmd-20.1 {SetReadOnlyAttribute} {unixOnly notRoot readonlyAttr} {
+test unixFCmd-20.1 {SetReadOnlyAttribute} {unix notRoot readonlyAttr} {
catch {file delete -force -- foo.test}
close [open foo.test w]
list [catch {file attributes foo.test -readonly 1} msg] $msg \
@@ -360,7 +360,7 @@ test unixFCmd-20.1 {SetReadOnlyAttribute} {unixOnly notRoot readonlyAttr} {
[catch {file attribute foo.test -readonly} msg] $msg \
[file delete -force -- foo.test]
} {0 {} 0 1 1 0 {} 0 0 {}}
-test unixFCmd-20.2 {SetReadOnlyAttribute} {unixOnly notRoot readonlyAttr} {
+test unixFCmd-20.2 {SetReadOnlyAttribute} {unix notRoot readonlyAttr} {
catch {file delete -force -- foo.test}
list [catch {file attributes foo.test -readonly 1} msg] $msg
} {1 {could not read "foo.test": no such file or directory}}