summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2003-03-19 01:19:50 (GMT)
committerKevin B Kenny <kennykb@acm.org>2003-03-19 01:19:50 (GMT)
commitcc539d2683c0e33f8b55a8b886fb36ddf6ca7577 (patch)
treeb9a1a7aac3dea037c8486f6af8a9788781fb9fe7
parent9501f8cadf329916ab83d74c5c5aee6edf99ca3c (diff)
downloadtcl-cc539d2683c0e33f8b55a8b886fb36ddf6ca7577.zip
tcl-cc539d2683c0e33f8b55a8b886fb36ddf6ca7577.tar.gz
tcl-cc539d2683c0e33f8b55a8b886fb36ddf6ca7577.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]
-rw-r--r--ChangeLog6
-rw-r--r--tests/registry.test18
2 files changed, 16 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a6541a..2055a0a 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..9e12849 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.12.2.1 2003/03/19 01:19:53 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]