summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkennykb <kennykb@noemail.net>2003-03-19 01:21:00 (GMT)
committerkennykb <kennykb@noemail.net>2003-03-19 01:21:00 (GMT)
commitbf512e02a860fc132474de1dd9496f128784331c (patch)
tree918c8066cae11f0efbaf48c76aa785d589f5fb86
parentf99df7a77d62ab6bf8e88dd7669cda113dabac0e (diff)
downloadtcl-bf512e02a860fc132474de1dd9496f128784331c.zip
tcl-bf512e02a860fc132474de1dd9496f128784331c.tar.gz
tcl-bf512e02a860fc132474de1dd9496f128784331c.tar.bz2
* tests/registry.test: Changed the conditionals to avoid an
abort if [testlocale] is missing, as when running the test in tclsh rather than tcltest. [Bug #705677] FossilOrigin-Name: 8adb259b149e7eee0156cff942f8c8803949c892
-rw-r--r--ChangeLog6
-rw-r--r--tests/registry.test18
2 files changed, 16 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index cea8c18..fd71d5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-18 Kevin Kenny <kennykb@users.sourceforge.net>
+
+ * tests/registry.test: Changed the conditionals to avoid an
+ abort if [testlocale] is missing, as when running the test in
+ tclsh rather than tcltest. [Bug #705677]
+
2003-03-18 Daniel Steffen <das@users.sourceforge.net>
* tools/tcltk-man2html.tcl: added support for building 'make html'
diff --git a/tests/registry.test b/tests/registry.test
index 2ace4d5..7f6612e 100644
--- a/tests/registry.test
+++ b/tests/registry.test
@@ -10,10 +10,10 @@
# Copyright (c) 1997 by Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
-# RCS: @(#) $Id: registry.test,v 1.12 2002/10/18 23:58:18 hobbs Exp $
+# RCS: @(#) $Id: registry.test,v 1.13 2003/03/19 01:21:01 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest
+ package require tcltest 2
namespace import -force ::tcltest::*
}
@@ -29,13 +29,15 @@ if {$tcl_platform(platform) == "windows"} {
}
# determine the current locale
-set old [testlocale all]
-if {![string compare [testlocale all ""] "English_United States.1252"]} {
- # error messages from registry package are already localized.
- set ::tcltest::testConstraints(english) 1
+if { [string compare {} [info commands testlocale]] } {
+ set old [testlocale all]
+ testConstraint english \
+ [string equal [testlocale all ""] "English_United States.1252"]
+ testlocale all $old
+ unset old
+} else {
+ testConstraint english false
}
-testlocale all $old
-unset old
set hostname [info hostname]