summaryrefslogtreecommitdiffstats
path: root/tests/winFCmd.test
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-09-16 14:56:07 (GMT)
committervincentdarley <vincentdarley>2003-09-16 14:56:07 (GMT)
commite6788bab0b7b55f8cca215f1f569d8716e1c78e8 (patch)
tree4e3d76904b31cf663a2688c36ddfcf4d5df3c799 /tests/winFCmd.test
parent13c7d5e6054461be54e6e463d4e60d7027322c81 (diff)
downloadtcl-e6788bab0b7b55f8cca215f1f569d8716e1c78e8.zip
tcl-e6788bab0b7b55f8cca215f1f569d8716e1c78e8.tar.gz
tcl-e6788bab0b7b55f8cca215f1f569d8716e1c78e8.tar.bz2
minor filesystem bug fixes
Diffstat (limited to 'tests/winFCmd.test')
-rw-r--r--tests/winFCmd.test46
1 files changed, 43 insertions, 3 deletions
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index 52c470c..2829fb6 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.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: winFCmd.test,v 1.21 2003/07/08 15:09:50 vincentdarley Exp $
+# RCS: @(#) $Id: winFCmd.test,v 1.22 2003/09/16 14:56:08 vincentdarley Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -606,8 +606,11 @@ test winFCmd-6.10 {TclpRemoveDirectory: attr == -1} {pcOnly 95} {
} {1 {nul EACCES}}
test winFCmd-6.11 {TclpRemoveDirectory: attr == -1} {pcOnly nt} {
cleanup
- list [catch {testfile rmdir /} msg] $msg
-} {1 {/ EACCES}}
+ set res [list [catch {testfile rmdir /} msg] $msg]
+ # WinXP returns EEXIST, WinNT seems to return EACCES. No policy
+ # decision has been made as to which is correct.
+ regsub {E(ACCES|EXIST)} $res "EACCES or EEXIST"
+} {1 {C:/ EACCES or EEXIST}}
test winFCmd-6.12 {TclpRemoveDirectory: errno == EACCES} {pcOnly 95} {
cleanup
createfile tf1
@@ -982,6 +985,43 @@ test winFCmd-15.10 {SetWinFileAttributes - failing} {pcOnly cdrom} {
test winFCmd-16.1 {Windows file normalization} {pcOnly} {
list [file normalize c:/] [file normalize C:/]
} {C:/ C:/}
+test winFCmd-16.2 {Windows file normalization} {pcOnly} {
+ close [open td1... w]
+ set res [file tail [file normalize td1]]
+ file delete td1...
+ set res
+} {td1}
+
+set pwd [pwd]
+set d [string index $pwd 0]
+
+test winFCmd-16.3 {Windows file normalization} {pcOnly} {
+ file norm ${d}:foo
+} [file join $pwd foo]
+test winFCmd-16.4 {Windows file normalization} {pcOnly} {
+ file norm [string tolower ${d}]:foo
+} [file join $pwd foo]
+test winFCmd-16.5 {Windows file normalization} {pcOnly} {
+ file norm ${d}:foo/bar
+} [file join $pwd foo/bar]
+test winFCmd-16.6 {Windows file normalization} {pcOnly} {
+ file norm ${d}:foo\\bar
+} [file join $pwd foo/bar]
+test winFCmd-16.7 {Windows file normalization} {pcOnly} {
+ file norm /bar
+} "${d}:/bar"
+test winFCmd-16.8 {Windows file normalization} {pcOnly} {
+ file norm ///bar
+} "${d}:/bar"
+test winFCmd-16.9 {Windows file normalization} {pcOnly} {
+ file norm /bar/foo
+} "${d}:/bar/foo"
+test winFCmd-16.10 {Windows file normalization} {pcOnly knownBug} {
+ if {$d eq "C"} { set dd "D" } else { set dd "C" }
+ file norm ${dd}:foo
+} {Tcl doesn't know about a drive-specific cwd}
+
+unset d pwd
# This block of code used to occur after the "return" call, so I'm
# commenting it out and assuming that this code is still under construction.