summaryrefslogtreecommitdiffstats
path: root/tests/winFCmd.test
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2009-11-11 23:46:08 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2009-11-11 23:46:08 (GMT)
commit043cd228a0ffcbd7a242301fbf3a571231516a74 (patch)
treecad215a0428385ccd12f59b1d982691cfbaefa25 /tests/winFCmd.test
parent4810938c1699131901dd15caf40842fc0c10b992 (diff)
downloadtcl-043cd228a0ffcbd7a242301fbf3a571231516a74.zip
tcl-043cd228a0ffcbd7a242301fbf3a571231516a74.tar.gz
tcl-043cd228a0ffcbd7a242301fbf3a571231516a74.tar.bz2
Fixed a number of test issues for Vista and Win7.
These test failures are due to the more restrictive permissions on the newer versions of Windows.
Diffstat (limited to 'tests/winFCmd.test')
-rw-r--r--tests/winFCmd.test79
1 files changed, 64 insertions, 15 deletions
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index 24fbf8e..849562c 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.42 2007/02/20 15:36:47 patthoyts Exp $
+# RCS: @(#) $Id: winFCmd.test,v 1.42.4.1 2009/11/11 23:46:09 patthoyts Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -546,8 +546,15 @@ test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} {win testfile testchmod} {
cleanup
file mkdir td1
testchmod 000 td1
- testfile rmdir td1
- file exists td1
+ catch {
+ testfile rmdir td1
+ file exists td1
+ } r
+ catch {
+ testchmod 777 td1
+ cleanup
+ }
+ set r
} {0}
test winFCmd-6.2 {TclpRemoveDirectory: errno: EEXIST} {win testfile} {
cleanup
@@ -586,8 +593,15 @@ test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} {win testfile testchmod}
cleanup
file mkdir td1
testchmod 000 td1
- testfile rmdir td1
- file exists td1
+ catch {
+ testfile rmdir td1
+ file exists td1
+ } r
+ catch {
+ testchmod 777 td1
+ cleanup
+ }
+ set r
} {0}
test winFCmd-6.10 {TclpRemoveDirectory: attr == -1} {win 95 testfile} {
cleanup
@@ -612,8 +626,15 @@ test winFCmd-6.13 {TclpRemoveDirectory: write-protected} {win testfile testchmod
cleanup
file mkdir td1
testchmod 000 td1
- testfile rmdir td1
- file exists td1
+ catch {
+ testfile rmdir td1
+ file exists td1
+ } r
+ catch {
+ testchmod 777 td1
+ cleanup
+ }
+ set r
} {0}
test winFCmd-6.14 {TclpRemoveDirectory: check if empty dir} {win 95 testfile} {
cleanup
@@ -700,8 +721,15 @@ test winFCmd-7.11 {TraverseWinTree: call TraversalCopy: DOTREE_PRED} {win testfi
file mkdir td1
createfile td1/tf1 tf1
testchmod 000 td1
- testfile cpdir td1 td2
- list [file exists td2] [file writable td2]
+ catch {
+ testfile cpdir td1 td2
+ list [file exists td2] [file writable td2]
+ } r
+ catch {
+ testchmod 777 td1
+ cleanup
+ }
+ set r
} {1 1}
test winFCmd-7.12 {TraverseWinTree: call TraversalDelete: DOTREE_PRED} {win testfile} {
cleanup
@@ -756,8 +784,15 @@ test winFCmd-7.19 {TraverseWinTree: call TraversalCopy: DOTREE_POSTD} {win testf
file mkdir td1
createfile td1/tf1 tf1
testchmod 000 td1
- testfile cpdir td1 td2
- list [file exists td2] [file writable td2]
+ catch {
+ testfile cpdir td1 td2
+ list [file exists td2] [file writable td2]
+ } r
+ catch {
+ testchmod 777 td1
+ cleanup
+ }
+ set r
} {1 1}
test winFCmd-7.20 {TraverseWinTree: call TraversalDelete: DOTREE_POSTD} \
{win testfile} {
@@ -781,8 +816,15 @@ test winFCmd-8.2 {TraversalCopy: DOTREE_PRED} {win testfile testchmod} {
cleanup
file mkdir td1/td2
testchmod 000 td1
- testfile cpdir td1 td2
- list [file writable td1] [file writable td1/td2]
+ catch {
+ testfile cpdir td1 td2
+ list [file writable td1] [file writable td1/td2]
+ } r
+ catch {
+ testchmod 777 td1
+ cleanup
+ }
+ set r
} {0 1}
test winFCmd-8.3 {TraversalCopy: DOTREE_POSTD} {win testfile} {
cleanup
@@ -808,8 +850,15 @@ test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} {win testfile testchmod} {
cleanup
file mkdir td1/td2
testchmod 000 td1
- testfile rmdir -force td1
- file exists td1
+ catch {
+ testfile rmdir -force td1
+ file exists td1
+ } r
+ catch {
+ testchmod 777 td1
+ cleanup
+ }
+ set r
} {0}
test winFCmd-9.4 {TraversalDelete: DOTREE_POSTD} {win testfile} {
cleanup