summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2002-05-02 20:15:19 (GMT)
committervincentdarley <vincentdarley>2002-05-02 20:15:19 (GMT)
commit7c91f1013324e9413b31489bacb0006f0ec0f997 (patch)
treedefc9cdccd62f7994fe3226776f5ea01c9a04065 /tests
parent35438a5685d2efcfe4ea877ab475aa116222817e (diff)
downloadtcl-7c91f1013324e9413b31489bacb0006f0ec0f997.zip
tcl-7c91f1013324e9413b31489bacb0006f0ec0f997.tar.gz
tcl-7c91f1013324e9413b31489bacb0006f0ec0f997.tar.bz2
fix to 551306
Diffstat (limited to 'tests')
-rw-r--r--tests/fileName.test25
-rw-r--r--tests/fileSystem.test2
-rw-r--r--tests/winFile.test14
3 files changed, 38 insertions, 3 deletions
diff --git a/tests/fileName.test b/tests/fileName.test
index 18ca882..3d34e70 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.18 2002/04/22 19:57:49 hobbs Exp $
+# RCS: @(#) $Id: fileName.test,v 1.19 2002/05/02 20:15:20 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1420,6 +1420,18 @@ test filename-11.45 {Tcl_GlobCmd on root volume} {
}
expr {$res1 == $res2}
} {1}
+test filename-11.46 {Tcl_GlobCmd} {
+ list [catch {glob -types abcde -dir foo *} msg] $msg
+} {1 {bad argument to "-types": abcde}}
+test filename-11.47 {Tcl_GlobCmd} {
+ list [catch {glob -types abcde -path foo *} msg] $msg
+} {1 {bad argument to "-types": abcde}}
+test filename-11.48 {Tcl_GlobCmd} {
+ list [catch {glob -types abcde -dir foo -join * *} msg] $msg
+} {1 {bad argument to "-types": abcde}}
+test filename-11.49 {Tcl_GlobCmd} {
+ list [catch {glob -types abcde -path foo -join * *} msg] $msg
+} {1 {bad argument to "-types": abcde}}
file rename $horribleglobname globTest
set globname globTest
@@ -1748,6 +1760,17 @@ test filename-16.13 {windows specific globbing} {pcOnly sharedCdrive} {
cd //[info hostname]/c
glob "\\\\\\\\[info hostname]\\\\c\\\\*Test"
} //[info hostname]/c/globTest
+test filename-16.14 {windows specific globbing} {pcOnly} {
+ cd [lindex [glob -types d -dir C:/ *] 0]
+ expr {[lsearch -exact [glob {{.,*}*}] ".."] != -1}
+} {1}
+test filename-16.15 {windows specific globbing} {pcOnly} {
+ cd [lindex [glob -types d -dir C:/ *] 0]
+ glob ..
+} {..}
+test filename-16.16 {windows specific globbing} {pcOnly} {
+ file tail [glob "[lindex [glob -types d -dir C:/ *] 0]/.."]
+} {..}
# cleanup
catch {file delete -force C:/globTest}
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index a5bd413..5a0713a 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -119,7 +119,7 @@ test filesystem-3.4 {Tcl_FSRegister} Tcltest {
test filesystem-3.5 {Tcl_FSUnregister} Tcltest {
testfilesystem 0
- file system bar
+ lindex [file system bar] 0
} {native}
test filesystem-4.0 {testfilesystem} {
diff --git a/tests/winFile.test b/tests/winFile.test
index 92c28a8..0cf76e2 100644
--- a/tests/winFile.test
+++ b/tests/winFile.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: winFile.test,v 1.6 2000/04/10 17:19:06 ericm Exp $
+# RCS: @(#) $Id: winFile.test,v 1.7 2002/05/02 20:15:20 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -62,6 +62,18 @@ test winFile-2.2 {TclpMatchFiles: case sensitivity} {pcOnly} {
set result
} {globlower globlower}
+test winFile-3.1 {file system} {pcOnly} {
+ set res "volume types ok"
+ foreach vol [file volumes] {
+ if {![string equal [lindex [file system $vol] 1] [testvolumetype $vol]]} {
+ set res "For $vol, we found [file system $vol]\
+ and [testvolumetype $vol] are different"
+ break
+ }
+ }
+ set res
+} {volume types ok}
+
# cleanup
::tcltest::cleanupTests
return