summaryrefslogtreecommitdiffstats
path: root/tests/unixInit.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-12-08 02:33:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-12-08 02:33:19 (GMT)
commit0c5264398b013bd0381d75a890c28bf5c96ea1a8 (patch)
tree35ddfd080c82fa6c4b05ea656c2652f230795046 /tests/unixInit.test
parent71b52332f92f0b1e37bb9e8e8e2036bde70d9ea6 (diff)
downloadtcl-0c5264398b013bd0381d75a890c28bf5c96ea1a8.zip
tcl-0c5264398b013bd0381d75a890c28bf5c96ea1a8.tar.gz
tcl-0c5264398b013bd0381d75a890c28bf5c96ea1a8.tar.bz2
* tests/unixInit.test (2.1-4): Added constraints so that when a
value of TCL_LIBRARY is required for process initialization, we skip the tests that mess with that value.
Diffstat (limited to 'tests/unixInit.test')
-rw-r--r--tests/unixInit.test20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/unixInit.test b/tests/unixInit.test
index f42c868..b7bffbd 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.44 2004/11/30 19:34:51 dgp Exp $
+# RCS: @(#) $Id: unixInit.test,v 1.45 2004/12/08 02:33:22 dgp Exp $
package require tcltest 2
namespace import -force ::tcltest::*
@@ -105,6 +105,16 @@ proc getlibpath [list [list program [interpreter]]] {
testConstraint testgetdefenc [llength [info commands testgetdefenc]]
+unset -nocomplain oldlibrary
+catch {
+ set oldlibrary $env(TCL_LIBRARY)
+ unset env(TCL_LIBRARY)
+}
+testConstraint canInitWithoutEnvTclLibrary [expr {[catch getlibpath] == 0}]
+if {[info exists oldlibrary]} {
+ set env(TCL_LIBRARY) $oldlibrary
+}
+
test unixInit-2.0 {TclpInitLibraryPath: setting tclDefaultEncodingDir} \
{unix testgetdefenc} {
set origDir [testgetdefenc]
@@ -114,7 +124,7 @@ test unixInit-2.0 {TclpInitLibraryPath: setting tclDefaultEncodingDir} \
set path
} {slappy}
test unixInit-2.1 {TclpInitLibraryPath: value of installLib, developLib} -constraints {
- unix stdio
+ unix stdio canInitWithoutEnvTclLibrary
} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
@@ -139,7 +149,7 @@ test unixInit-2.1 {TclpInitLibraryPath: value of installLib, developLib} -constr
}
} -result {0 0}
test unixInit-2.2 {TclpInitLibraryPath: TCL_LIBRARY} -constraints {
- unix stdio
+ unix stdio canInitWithoutEnvTclLibrary
} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
@@ -160,7 +170,7 @@ test unixInit-2.2 {TclpInitLibraryPath: TCL_LIBRARY} -constraints {
}
} -result "sparkly"
test unixInit-2.3 {TclpInitLibraryPath: TCL_LIBRARY wrong version} -constraints {
- unix stdio
+ unix stdio canInitWithoutEnvTclLibrary
} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
@@ -181,7 +191,7 @@ test unixInit-2.3 {TclpInitLibraryPath: TCL_LIBRARY wrong version} -constraints
}
} -result [list /a/b/tcl1.7 /a/b/tcl[info tclversion]]
test unixInit-2.4 {TclpInitLibraryPath: TCL_LIBRARY: INTL} -constraints {
- unix stdio knownBug
+ unix stdio canInitWithoutEnvTclLibrary knownBug
} -setup {
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)