summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2012-05-26 12:51:55 (GMT)
committerdkf <dkf@noemail.net>2012-05-26 12:51:55 (GMT)
commite753c5aa0f5f929131a2fc3dc60a3f34a8a2c3b8 (patch)
tree194aa0a9f959a329e2cbdf61625b09a89f49716d /tests
parent50262f79a0b3fbf3a0de5dc8865512252cdd6df6 (diff)
downloadtcl-e753c5aa0f5f929131a2fc3dc60a3f34a8a2c3b8.zip
tcl-e753c5aa0f5f929131a2fc3dc60a3f34a8a2c3b8.tar.gz
tcl-e753c5aa0f5f929131a2fc3dc60a3f34a8a2c3b8.tar.bz2
Track the remnants of [Bug 2913625] as knownBug tests. :-(
FossilOrigin-Name: a808d38140aa7755088cd5606cb82c536bcd8518
Diffstat (limited to 'tests')
-rw-r--r--tests/safe.test46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/safe.test b/tests/safe.test
index 7b83cc6..4bd8509 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -690,6 +690,52 @@ test safe-14.1 {Check that module path is the same as in the master interpreter
} -cleanup {
safe::interpDelete $i
} -result [::tcl::tm::path list]
+
+### ~ should have no special meaning in paths in safe interpreters
+test safe-15.1 {Bug 2913625: defang ~ in paths} -setup {
+ set savedHOME $env(HOME)
+ set env(HOME) /foo/bar
+ set i [safe::interpCreate]
+} -constraints knownBug -body {
+ $i eval {
+ set d [format %c 126]
+ list [file dirname $d] [file tail $d] \
+ [file join [file dirname $d] [file tail $d]]
+ }
+} -cleanup {
+ safe::interpDelete $i
+ set env(HOME) $savedHOME
+} -result {~}
+test safe-15.2 {Bug 2913625: defang ~user in paths} -setup {
+ set i [safe::interpCreate]
+ set user $tcl_platform(user)
+} -constraints knownBug -body {
+ string map [list $user USER] [$i eval \
+ "file join \[file dirname ~$user\] \[file tail ~$user\]"]
+} -cleanup {
+ safe::interpDelete $i
+} -result {~USER}
+test safe-15.3 {Bug 2913625: defang ~ in globs} -setup {
+ set savedHOME $env(HOME)
+ set env(HOME) /
+ set i [safe::interpCreate]
+} -constraints knownBug -body {
+ $i expose glob realglob
+ $i eval {realglob -nocomplain [join {~ / *} ""]}
+} -cleanup {
+ safe::interpDelete $i
+ set env(HOME) $savedHOME
+} -result {~}
+test safe-15.4 {Bug 2913625: defang ~user in globs} -setup {
+ set i [safe::interpCreate]
+ set user $tcl_platform(user)
+} -constraints knownBug -body {
+ $i expose glob realglob
+ string map [list $user USER] [$i eval [list\
+ realglob -directory ~$user *]]
+} -cleanup {
+ safe::interpDelete $i
+} -result {~USER}
set ::auto_path $saveAutoPath
# cleanup