summaryrefslogtreecommitdiffstats
path: root/tests/fileSystem.test
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2006-03-29 22:19:10 (GMT)
committerdgp@users.sourceforge.net <dgp>2006-03-29 22:19:10 (GMT)
commitd76553e830879a2e532bc9897faeb6287d8ffd7f (patch)
tree4540c3a9c4bdbaa0eb0ac055eaf9231cdcaeb552 /tests/fileSystem.test
parent96c31aebae9433472d5c68a65af81bdbc80d6288 (diff)
downloadtcl-d76553e830879a2e532bc9897faeb6287d8ffd7f.zip
tcl-d76553e830879a2e532bc9897faeb6287d8ffd7f.tar.gz
tcl-d76553e830879a2e532bc9897faeb6287d8ffd7f.tar.bz2
* generic/tclPathObj.c: More fixes for path normalization when /../
* tests/fileSystem.test: tries to go beyond root.[Bug 1379287]
Diffstat (limited to 'tests/fileSystem.test')
-rw-r--r--tests/fileSystem.test40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 06ab643..39e02c4 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -433,6 +433,46 @@ test filesystem-1.46 {file normalisation .. beyond root (Bug 1379287)} {
set res "ok"
}
} {ok}
+test filesystem-1.47 {file normalisation .. beyond root (Bug 1379287)} {
+ set a [file norm /..]
+ set b [file norm /]
+
+ if {![string equal $a $b]} {
+ set res "Paths should be equal: $a , $b"
+ } else {
+ set res "ok"
+ }
+} {ok}
+test filesystem-1.48 {file normalisation .. beyond root (Bug 1379287)} {
+ set a [file norm /../]
+ set b [file norm /]
+
+ if {![string equal $a $b]} {
+ set res "Paths should be equal: $a , $b"
+ } else {
+ set res "ok"
+ }
+} {ok}
+test filesystem-1.49 {file normalisation .. beyond root (Bug 1379287)} {
+ set a [file norm /.]
+ set b [file norm /]
+
+ if {![string equal $a $b]} {
+ set res "Paths should be equal: $a , $b"
+ } else {
+ set res "ok"
+ }
+} {ok}
+test filesystem-1.50 {file normalisation .. beyond root (Bug 1379287)} {
+ set a [file norm /./]
+ set b [file norm /]
+
+ if {![string equal $a $b]} {
+ set res "Paths should be equal: $a , $b"
+ } else {
+ set res "ok"
+ }
+} {ok}
test filesystem-2.0 {new native path} {unix} {
foreach f [lsort [glob -nocomplain /usr/bin/c*]] {