summaryrefslogtreecommitdiffstats
path: root/tests/unixInit.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-04-15 22:41:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-04-15 22:41:40 (GMT)
commit4812bb5b2d273de7fa5c07a1a8450a5dfa5e5803 (patch)
tree7cc942aecf940691248e58cb9905c2e4b5a0d736 /tests/unixInit.test
parent4b3cad67669ee24ba10a1b95e9f8c91747b1d11b (diff)
downloadtcl-4812bb5b2d273de7fa5c07a1a8450a5dfa5e5803.zip
tcl-4812bb5b2d273de7fa5c07a1a8450a5dfa5e5803.tar.gz
tcl-4812bb5b2d273de7fa5c07a1a8450a5dfa5e5803.tar.bz2
* tests/unixInit.test: Disabled obsolete tests and removed code
* tests/encoding.test: that supported them. * generic/tclInterp.c:
Diffstat (limited to 'tests/unixInit.test')
-rw-r--r--tests/unixInit.test81
1 files changed, 24 insertions, 57 deletions
diff --git a/tests/unixInit.test b/tests/unixInit.test
index b7bffbd..1b7a6f0 100644
--- a/tests/unixInit.test
+++ b/tests/unixInit.test
@@ -10,9 +10,9 @@
# 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.45 2004/12/08 02:33:22 dgp Exp $
+# RCS: @(#) $Id: unixInit.test,v 1.46 2005/04/15 22:41:44 dgp Exp $
-package require tcltest 2
+package require tcltest 2.2
namespace import -force ::tcltest::*
unset -nocomplain path
catch {set oldlang $env(LANG)}
@@ -92,40 +92,21 @@ test unixInit-1.2 {initialisation: standard channel type deduction} {unix stdio}
}
} {OK}
-proc getlibpath [list [list program [interpreter]]] {
- set f [open "|[list $program]" w+]
- fconfigure $f -buffering none
- puts $f {puts $::tcl::LibPath; exit}
- set path [gets $f]
- close $f
- return $path
-}
-
-# Some tests require the testgetdefenc command
+# The unixInit-2.* tests were written to test the internal routine,
+# TclpInitLibraryPath. That routine no longer does the things it used
+# to do so those tests are obsolete. Skip them.
-testConstraint testgetdefenc [llength [info commands testgetdefenc]]
+skip [concat [skip] unixInit-2.*]
-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} {
+test unixInit-2.0 {TclpInitLibraryPath: setting tclDefaultEncodingDir} {
set origDir [testgetdefenc]
testsetdefenc slappy
set path [testgetdefenc]
testsetdefenc $origDir
set path
} {slappy}
-test unixInit-2.1 {TclpInitLibraryPath: value of installLib, developLib} -constraints {
- unix stdio canInitWithoutEnvTclLibrary
-} -setup {
+
+test unixInit-2.1 {TclpInitLibraryPath: value of installLib, developLib} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)
@@ -148,9 +129,8 @@ test unixInit-2.1 {TclpInitLibraryPath: value of installLib, developLib} -constr
unset oldlibrary
}
} -result {0 0}
-test unixInit-2.2 {TclpInitLibraryPath: TCL_LIBRARY} -constraints {
- unix stdio canInitWithoutEnvTclLibrary
-} -setup {
+
+test unixInit-2.2 {TclpInitLibraryPath: TCL_LIBRARY} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)
@@ -169,9 +149,8 @@ test unixInit-2.2 {TclpInitLibraryPath: TCL_LIBRARY} -constraints {
unset oldlibrary
}
} -result "sparkly"
-test unixInit-2.3 {TclpInitLibraryPath: TCL_LIBRARY wrong version} -constraints {
- unix stdio canInitWithoutEnvTclLibrary
-} -setup {
+
+test unixInit-2.3 {TclpInitLibraryPath: TCL_LIBRARY wrong version} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)
@@ -190,9 +169,8 @@ test unixInit-2.3 {TclpInitLibraryPath: TCL_LIBRARY wrong version} -constraints
unset oldlibrary
}
} -result [list /a/b/tcl1.7 /a/b/tcl[info tclversion]]
-test unixInit-2.4 {TclpInitLibraryPath: TCL_LIBRARY: INTL} -constraints {
- unix stdio canInitWithoutEnvTclLibrary knownBug
-} -setup {
+
+test unixInit-2.4 {TclpInitLibraryPath: TCL_LIBRARY: INTL} -setup {
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)
}
@@ -211,13 +189,11 @@ test unixInit-2.4 {TclpInitLibraryPath: TCL_LIBRARY: INTL} -constraints {
unset oldlibrary
}
} -result "\xa7"
-test unixInit-2.5 {TclpInitLibraryPath: compiled-in library path} \
- {emptyTest unix} {
+test unixInit-2.5 {TclpInitLibraryPath: compiled-in library path} {
# cannot test
} {}
-test unixInit-2.6 {TclpInitLibraryPath: executable relative} -constraints {
- unix stdio
-} -setup {
+
+test unixInit-2.6 {TclpInitLibraryPath: executable relative} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)
@@ -248,23 +224,18 @@ test unixInit-2.6 {TclpInitLibraryPath: executable relative} -constraints {
}
} -result [list [temporaryDirectory]/tmp/sparkly/lib/tcl[info tclversion] [temporaryDirectory]/tmp/lib/tcl[info tclversion]]
-test unixInit-2.7 {TclpInitLibraryPath: compiled-in library path} \
- {emptyTest unix} {
+test unixInit-2.7 {TclpInitLibraryPath: compiled-in library path} {
# would need test command to get defaultLibDir and compare it to
# [lindex $auto_path end]
} {}
+
#
# The following two tests write to the directory /tmp/sparkly instead
# of to [temporaryDirectory]. This is because the failures tested by
# these tests need paths near the "root" of the file system to present
# themselves.
#
-testConstraint noSparkly [expr {![file exists [file join /tmp sparkly]]}]
-testConstraint noTmpInstall [expr {![file exists \
- [file join /tmp lib tcl[info tclversion]]]}]
-test unixInit-2.8 {TclpInitLibraryPath: all absolute pathtype} -constraints {
- unix noSparkly noTmpInstall
-} -setup {
+test unixInit-2.8 {TclpInitLibraryPath: all absolute pathtype} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)
@@ -325,10 +296,8 @@ test unixInit-2.8 {TclpInitLibraryPath: all absolute pathtype} -constraints {
unset oldlibrary
}
} -result 1
-testConstraint noTmpBuild [expr {![file exists [file join /tmp library]]}]
-test unixInit-2.9 {TclpInitLibraryPath: paths relative to executable} -constraints {
- unix noSparkly noTmpBuild
-} -setup {
+
+test unixInit-2.9 {TclpInitLibraryPath: paths relative to executable} -setup {
# Checking for Bug 438014
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
@@ -355,9 +324,7 @@ test unixInit-2.9 {TclpInitLibraryPath: paths relative to executable} -constrain
} -result [list /tmp/lib/tcl[info tclversion] /lib/tcl[info tclversion] \
/tmp/library /library /tcl[info patchlevel]/library]
-test unixInit-2.10 {TclpInitLibraryPath: executable relative} -constraints {
- unix stdio
-} -setup {
+test unixInit-2.10 {TclpInitLibraryPath: executable relative} -setup {
unset -nocomplain oldlibrary
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)