summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenn <jenn>1999-10-20 01:27:03 (GMT)
committerjenn <jenn>1999-10-20 01:27:03 (GMT)
commit97749c4bf16f9d415c961f2cdb18c7483c41c028 (patch)
tree741cf118ac2d6eb1f2385566e07e61adf405135d
parentb6451a8e12d7770e231cc0047b993bd8e1add92f (diff)
downloadtcl-97749c4bf16f9d415c961f2cdb18c7483c41c028.zip
tcl-97749c4bf16f9d415c961f2cdb18c7483c41c028.tar.gz
tcl-97749c4bf16f9d415c961f2cdb18c7483c41c028.tar.bz2
Merged code from core-8-2-1 branch that changes the checks for the
value of tcl_interactive to also incorporate a check for the existence of the variable.
-rw-r--r--ChangeLog4
-rw-r--r--library/tcltest/tcltest.tcl12
-rw-r--r--library/tcltest1.0/tcltest.tcl12
3 files changed, 20 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index a4e0d4b..2127ead 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,10 @@
internally refactors common code for dealing with paths into
separate procedures. [Bug: 2838, 2842]
+ Merged code from core-8-2-1 branch that changes the checks for the
+ value of tcl_interactive to also incorporate a check for the
+ existence of the variable.
+
* tests/autoMkindex.test:
* tests/pkgMkIndex.test: Explicitly cd to
::tcltest::testsDirectory at the beginning of the test run
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index d633b21..0fd2090 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -12,7 +12,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: tcltest.tcl,v 1.15 1999/10/19 18:08:42 jenn Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.16 1999/10/20 01:27:05 jenn Exp $
package provide tcltest 1.0
@@ -529,8 +529,12 @@ proc ::tcltest::initConstraints {} {
set ::tcltest::testConstraints(userInteraction) 0
# Some tests must be skipped if the interpreter is not in interactive mode
-
- set ::tcltest::testConstraints(interactive) $tcl_interactive
+
+ if {[info exists tcl_interactive]} {
+ set ::tcltest::testConstraints(interactive) $::tcl_interactive
+ } else {
+ set ::tcltest::testConstraints(interactive) 0
+ }
# Some tests can only be run if the installation came from a CD image
# instead of a web image
@@ -1239,7 +1243,7 @@ proc ::tcltest::cleanupTests {{calledFromAllFile 0}} {
# exit only if running Tk in non-interactive mode
global tk_version tcl_interactive
- if {[info exists tk_version] && !$tcl_interactive} {
+ if {[info exists tk_version] && ![info exists tcl_interactive]} {
exit
}
} else {
diff --git a/library/tcltest1.0/tcltest.tcl b/library/tcltest1.0/tcltest.tcl
index d633b21..0fd2090 100644
--- a/library/tcltest1.0/tcltest.tcl
+++ b/library/tcltest1.0/tcltest.tcl
@@ -12,7 +12,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: tcltest.tcl,v 1.15 1999/10/19 18:08:42 jenn Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.16 1999/10/20 01:27:05 jenn Exp $
package provide tcltest 1.0
@@ -529,8 +529,12 @@ proc ::tcltest::initConstraints {} {
set ::tcltest::testConstraints(userInteraction) 0
# Some tests must be skipped if the interpreter is not in interactive mode
-
- set ::tcltest::testConstraints(interactive) $tcl_interactive
+
+ if {[info exists tcl_interactive]} {
+ set ::tcltest::testConstraints(interactive) $::tcl_interactive
+ } else {
+ set ::tcltest::testConstraints(interactive) 0
+ }
# Some tests can only be run if the installation came from a CD image
# instead of a web image
@@ -1239,7 +1243,7 @@ proc ::tcltest::cleanupTests {{calledFromAllFile 0}} {
# exit only if running Tk in non-interactive mode
global tk_version tcl_interactive
- if {[info exists tk_version] && !$tcl_interactive} {
+ if {[info exists tk_version] && ![info exists tcl_interactive]} {
exit
}
} else {