summaryrefslogtreecommitdiffstats
path: root/tests/fCmd.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-21 14:30:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-21 14:30:27 (GMT)
commit4102bfec1a6ab7f5c92bce5b3160cc76a5145a78 (patch)
tree2f64f8ca4811683ba2cc27abe104b434dac56085 /tests/fCmd.test
parentf47c327136e7b60255b0f986fc0061b5fc554ea7 (diff)
downloadtcl-4102bfec1a6ab7f5c92bce5b3160cc76a5145a78.zip
tcl-4102bfec1a6ab7f5c92bce5b3160cc76a5145a78.tar.gz
tcl-4102bfec1a6ab7f5c92bce5b3160cc76a5145a78.tar.bz2
Remove duplicated tests. The enhancements to fCmd-30.[12] and the new test case fCmd-30.3 were backported from Tcl8.6, but the original tests were not removed.
Diffstat (limited to 'tests/fCmd.test')
-rw-r--r--tests/fCmd.test51
1 files changed, 18 insertions, 33 deletions
diff --git a/tests/fCmd.test b/tests/fCmd.test
index 6c5e314..0c51c0c 100644
--- a/tests/fCmd.test
+++ b/tests/fCmd.test
@@ -2393,7 +2393,7 @@ test fCmd-28.12 {file link: cd into a link} -setup {
cd ..
set up [pwd]
cd $orig
- # now '$up' should be either $orig or [file dirname abc.dir], depending on
+ # Now '$up' should be either $orig or [file dirname abc.dir], depending on
# whether 'cd' actually moves to the destination of a link, or simply
# treats the link as a directory. (On windows the former, on unix the
# latter, I believe)
@@ -2528,17 +2528,23 @@ test fCmd-28.22 {file link: relative paths} -setup {
catch {file delete -force d1}
cd [workingDirectory]
} -result d2/d3
+try {
+ cd [temporaryDirectory]
+ file delete -force abc.link
+ file delete -force d1/d2
+ file delete -force d1
+} finally {
+ cd [workingDirectory]
+}
+removeFile abc2.file
+removeFile abc.file
+removeDirectory abc2.dir
+removeDirectory abc.dir
test fCmd-29.1 {weird memory corruption fault} -body {
open [file join ~a_totally_bogus_user_id/foo bar]
} -returnCodes error -match glob -result *
-cd [temporaryDirectory]
-file delete -force abc.link
-file delete -force d1/d2
-file delete -force d1
-cd [workingDirectory]
-
test fCmd-30.1 {file writable on 'My Documents'} -setup {
# Get the localized version of the folder name by looking in the registry.
set mydocsname [registry get {HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders} Personal]
@@ -2561,32 +2567,6 @@ test fCmd-30.3 {file readable on 'pagefile.sys'} -constraints {win} -body {
return $r
} -result {exists 1 readable 0 stat 0 {}}
-removeFile abc2.file
-removeFile abc.file
-removeDirectory abc2.dir
-removeDirectory abc.dir
-
-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]} {
@@ -2594,3 +2574,8 @@ if {[testConstraint unix]} {
}
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# fill-column: 78
+# End: