summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-03-04 15:11:01 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-03-04 15:11:01 (GMT)
commitc862e5709590a9330c9b814109a0fbfd70f027cb (patch)
tree70b43a73aac6cd2c756bf315e7abee22f77ce22d
parent0229ba1283c2457c63df5674f54831eeb4a120ca (diff)
downloadtcl-c862e5709590a9330c9b814109a0fbfd70f027cb.zip
tcl-c862e5709590a9330c9b814109a0fbfd70f027cb.tar.gz
tcl-c862e5709590a9330c9b814109a0fbfd70f027cb.tar.bz2
Add test for [9c5a00c69d], tilde expansion of ~user
-rw-r--r--tests/fileSystem.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index f363d86..2de778a 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -277,6 +277,16 @@ test filesystem-1.30.1 {normalisation of existing user} -body {
test filesystem-1.30.2 {normalisation of nonexistent user specified as user@domain} -body {
file normalize ~nonexistentuser@nonexistentdomain
} -returnCodes error -result {user "nonexistentuser@nonexistentdomain" doesn't exist}
+test filesystem-1.30.3 {file normalization should distinguish between ~ and ~user} -setup {
+ set oldhome $::env(HOME)
+ set olduserhome [file normalize ~$::tcl_platform(user)]
+ set ::env(HOME) [file join $oldhome temp]
+} -cleanup {
+ set env(HOME) $oldhome
+} -body {
+ list [string equal [file normalize ~] $::env(HOME)] \
+ [string equal $olduserhome [file normalize ~$::tcl_platform(user)]]
+} -result {1 1}
test filesystem-1.31 {link normalisation: link near filesystem root} {testsetplatform} {
testsetplatform unix
file normalize /foo/../bar