diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tests/registry.test | 18 |
2 files changed, 16 insertions, 8 deletions
@@ -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] |