summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2003-03-19 01:21:01 (GMT)
committerKevin B Kenny <kennykb@acm.org>2003-03-19 01:21:01 (GMT)
commitf0273cd41b4b13cfd193ecf17ef5398525483120 (patch)
tree918c8066cae11f0efbaf48c76aa785d589f5fb86 /tests
parentdcfb2e5557e33d2ffc3f05df4f3dd0e94209d6ed (diff)
downloadtcl-f0273cd41b4b13cfd193ecf17ef5398525483120.zip
tcl-f0273cd41b4b13cfd193ecf17ef5398525483120.tar.gz
tcl-f0273cd41b4b13cfd193ecf17ef5398525483120.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]
Diffstat (limited to 'tests')
-rw-r--r--tests/registry.test18
1 files changed, 10 insertions, 8 deletions
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]