summaryrefslogtreecommitdiffstats
path: root/tests/unixInit.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-01-04 21:30:49 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-01-04 21:30:49 (GMT)
commit82208ae074ac93ecebefb924402d1dc992a72432 (patch)
treebb90d355e37e685906cc50cf684aa34b316d3be8 /tests/unixInit.test
parentcced21f712893036cd46da8879ba0bf48bca9c48 (diff)
downloadtcl-82208ae074ac93ecebefb924402d1dc992a72432.zip
tcl-82208ae074ac93ecebefb924402d1dc992a72432.tar.gz
tcl-82208ae074ac93ecebefb924402d1dc992a72432.tar.bz2
2001-01-04 Don Porter <dgp@users.sourceforge.net>
* tests/unixInit.test: * unix/tclUnixInit.c (TclpInitLibraryPath): * win/tclWinInit.c (TclpInitLibraryPath): Several entries in the library path ($tcl_libPath) are determined relative to the absolute path of the executable. When the executable is installed in or near the root directory of the file system, relative pathnames were being incorrectly generated, and in the worst case, memory access violations were crashing the program. [Bug 119416, Patch 102972]
Diffstat (limited to 'tests/unixInit.test')
-rw-r--r--tests/unixInit.test20
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/unixInit.test b/tests/unixInit.test
index 746114c..3017587 100644
--- a/tests/unixInit.test
+++ b/tests/unixInit.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: unixInit.test,v 1.13 2000/04/10 17:19:05 ericm Exp $
+# RCS: @(#) $Id: unixInit.test,v 1.14 2001/01/04 21:30:49 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -150,6 +150,24 @@ test unixInit-2.7 {TclpInitLibraryPath: compiled-in library path} \
# would need test command to get defaultLibDir and compare it to
# [lindex $auto_path end]
} {}
+test unixInit-2.8 {TclpInitLibraryPath: all absolute pathtype} {unixOnly} {
+ file delete -force /tmp/sparkly
+ file delete -force /tmp/lib
+ file mkdir /tmp/sparkly
+ file copy $::tcltest::tcltest /tmp/sparkly/tcltest
+
+ file mkdir /tmp/lib/tcl[info tclversion]
+ close [open /tmp/lib/tcl[info tclversion]/init.tcl w]
+
+ set allAbsolute 1
+ foreach dir [getlibpath /tmp/sparkly/tcltest] {
+ set allAbsolute [expr {$allAbsolute \
+ && [string equal absolute [file pathtype $dir]]}]
+ }
+ file delete -force /tmp/sparkly
+ file delete -force /tmp/lib
+ set allAbsolute
+} 1
test unixInit-3.1 {TclpSetInitialEncodings} {unixOnly installedTcl} {
set env(LANG) C