summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-03-13 16:28:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-03-13 16:28:43 (GMT)
commit9ac074bd097e9924cd88d9fa603e507e9380c2a7 (patch)
tree3cdaadac1125e5af77b246055f21f41c48a390dd
parent962427e8cd982fd685ca30f221083da2e7b62cea (diff)
downloadtcl-9ac074bd097e9924cd88d9fa603e507e9380c2a7.zip
tcl-9ac074bd097e9924cd88d9fa603e507e9380c2a7.tar.gz
tcl-9ac074bd097e9924cd88d9fa603e507e9380c2a7.tar.bz2
Fix bugs in msgcat that prevent clean test suite run.
-rw-r--r--library/msgcat/msgcat.tcl2
-rw-r--r--tests/msgcat.test5
2 files changed, 6 insertions, 1 deletions
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl
index 100f425..598330d 100644
--- a/library/msgcat/msgcat.tcl
+++ b/library/msgcat/msgcat.tcl
@@ -1260,7 +1260,7 @@ proc msgcat::mcutil::getsystemlocale {} {
# On Darwin, fallback to current CFLocale identifier if available.
#
if {[info exists ::tcl::mac::locale] && $::tcl::mac::locale ne ""} {
- if {![catch { ConvertLocale $::tcl::mac::locale] } locale]} {
+ if {![catch { ConvertLocale $::tcl::mac::locale } locale]} {
return $locale
}
}
diff --git a/tests/msgcat.test b/tests/msgcat.test
index 7ab9bcf..0d2f928 100644
--- a/tests/msgcat.test
+++ b/tests/msgcat.test
@@ -55,8 +55,13 @@ namespace eval ::msgcat::test {
set result [string tolower [lindex $setVars 0]]
if {[string length $result] == 0} {
if {[info exists ::tcl::mac::locale]} {
+if {[package vsatisfies [package provide msgcat] 1.7]} {
+ set result [string tolower \
+ [msgcat::mcutil::ConvertLocale $::tcl::mac::locale]]
+} else {
set result [string tolower \
[msgcat::ConvertLocale $::tcl::mac::locale]]
+}
} else {
if {([info sharedlibextension] eq ".dll")
&& ![catch {package require registry}]} {