summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/fileName.test14
-rw-r--r--tests/fileSystem.test25
2 files changed, 38 insertions, 1 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index 5f70555..15bef4e 100644
--- a/tests/fileName.test
+++ b/tests/fileName.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: fileName.test,v 1.28 2003/02/04 17:06:52 vincentdarley Exp $
+# RCS: @(#) $Id: fileName.test,v 1.29 2003/02/07 15:29:31 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1823,6 +1823,18 @@ test filename-17.1 {windows specific special files} {testsetplatform} {
[file pathtype foo]
} {absolute absolute absolute absolute absolute absolute relative}
+test filename-17.2 {windows specific glob with executable} {winOnly} {
+ makeDirectory execglob
+ makeFile contents execglob/abc.exe
+ makeFile contents execglob/abc.notexecutable
+ set res [glob -nocomplain -dir [temporaryDirectory]/execglob \
+ -tails -types x *]
+ removeFile execglob/abc.exe
+ removeFile execglob/abc.notexecutable
+ removeDirectory execglob
+ set res
+} {abc.exe}
+
# cleanup
catch {file delete -force C:/globTest}
cd [temporaryDirectory]
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 9a4f1c2..37a0666 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -420,6 +420,31 @@ test filesystem-7.2 {cross-filesystem copy from vfs maintains mtime} {
removeFile gorp.file
+test filesystem-8.1 {relative path objects and caching of pwd} {
+ set dir [pwd]
+ cd [tcltest::temporaryDirectory]
+ # We created this file several tests ago.
+ makeDirectory abc
+ makeDirectory def
+ makeFile "contents" [file join abc foo]
+ cd abc
+ set f "foo"
+ set res {}
+ lappend res [file exists $f]
+ lappend res [file exists $f]
+ cd ..
+ cd def
+ # If we haven't cleared the object's cwd cache, Tcl
+ # will think it still exists.
+ lappend res [file exists $f]
+ lappend res [file exists $f]
+ removeFile [file join abc foo]
+ removeDirectory abc
+ removeDirectory def
+ cd $dir
+ set res
+} {1 1 0 0}
+
cleanupTests
}
namespace delete ::tcl::test::fileSystem