summaryrefslogtreecommitdiffstats
path: root/tests/fileSystem.test
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-03-05 11:42:31 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-03-05 11:42:31 (GMT)
commit0968aa6de7b67ed474049bb1f53a03b192f9c07c (patch)
tree6d3139fa8fe823e49006d0ba4dd810fb824ecc4c /tests/fileSystem.test
parent923ff1e3ca4171dd5d562edfcfc4aaab9dfb8d7a (diff)
parent6e7d72c158143064e634c6d95f4c1107178d4b31 (diff)
downloadtcl-0968aa6de7b67ed474049bb1f53a03b192f9c07c.zip
tcl-0968aa6de7b67ed474049bb1f53a03b192f9c07c.tar.gz
tcl-0968aa6de7b67ed474049bb1f53a03b192f9c07c.tar.bz2
Merge 8.7: Bug [9c5a00c69d]. Fix ~user on Windows
Diffstat (limited to 'tests/fileSystem.test')
-rw-r--r--tests/fileSystem.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 5e98c39..d104282 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -275,6 +275,16 @@ test filesystem-1.30 {
test filesystem-1.30.1 {normalisation of existing user} -body {
file normalize ~$::tcl_platform(user)
} -result [file join [pwd] ~$::tcl_platform(user)]
+test filesystem-1.30.3 {file normalization should distinguish between ~ and ~user} -setup {
+ set oldhome $::env(HOME)
+ set olduserhome [file home $::tcl_platform(user)]
+ set ::env(HOME) [file join $oldhome temp]
+} -cleanup {
+ set env(HOME) $oldhome
+} -body {
+ list [string equal [file home] $::env(HOME)] \
+ [string equal $olduserhome [file home $::tcl_platform(user)]]
+} -result {1 1}
test filesystem-1.31 {link normalisation: link near filesystem root} {testsetplatform} {
testsetplatform unix
file normalize /foo/../bar