summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2001-01-04 21:30:48 (GMT)
committerdgp <dgp@noemail.net>2001-01-04 21:30:48 (GMT)
commitcbe44fe3d34cca00981c3f6a5111ff85932dcb6d (patch)
treebb90d355e37e685906cc50cf684aa34b316d3be8 /tests
parentdb3ebf8885014976c4e8f2358352abc23093986d (diff)
downloadtcl-cbe44fe3d34cca00981c3f6a5111ff85932dcb6d.zip
tcl-cbe44fe3d34cca00981c3f6a5111ff85932dcb6d.tar.gz
tcl-cbe44fe3d34cca00981c3f6a5111ff85932dcb6d.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] FossilOrigin-Name: b363b69d1555d39a1a0be04e8f16c9ddec0ab8bb
Diffstat (limited to 'tests')
-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