summaryrefslogtreecommitdiffstats
path: root/tests/fCmd.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-03-20 15:39:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-03-20 15:39:48 (GMT)
commitfc2ae2acaf52ad6ce086f27d52b03b997e3c870b (patch)
tree2a414bb67d98978da37bc166a018a34d0a4e1a50 /tests/fCmd.test
parent09d7c9d217b0fc36a3d9a88c1583c179f8917def (diff)
parentf47c327136e7b60255b0f986fc0061b5fc554ea7 (diff)
downloadtcl-fc2ae2acaf52ad6ce086f27d52b03b997e3c870b.zip
tcl-fc2ae2acaf52ad6ce086f27d52b03b997e3c870b.tar.gz
tcl-fc2ae2acaf52ad6ce086f27d52b03b997e3c870b.tar.bz2
Bring forward tests to trunk
Diffstat (limited to 'tests/fCmd.test')
-rw-r--r--tests/fCmd.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 8f27ad4..29447f0 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -2599,7 +2599,28 @@ test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {win} -body {
}
return $r
} -result {exists 1 readable 0 stat 0 {}}
-
+
+test fCmd-30.4 {file writable on 'My Documents'} -constraints {win 2000orNewer} -body {
+ set mydocsname "~/My Documents"
+ # Would be good to localise this name, since this test will only function
+ # on english-speaking windows otherwise
+ if {[file exists $mydocsname]} {
+ return [file writable $mydocsname]
+ }
+ return 1
+} -result {1}
+test fCmd-30.5 {file readable on 'NTUSER.DAT'} -constraints {win 2000orNewer knownBug} -body {
+ # Apparently the OS has this file open with exclusive permissions Windows
+ # doesn't provide any way to determine that fact without actually trying
+ # to open the file (open NTUSER.dat r), which fails. Hence this isn't
+ # really a knownBug in Tcl, but an OS limitation. But, perhaps in the
+ # future that limitation will be lifted.
+ if {[file exists "~/NTUSER.DAT"]} {
+ return [file readable "~/NTUSER.DAT"]
+ }
+ return 0
+} -result {0}
+
# cleanup
cleanup
if {[testConstraint unix]} {