From 9ac074bd097e9924cd88d9fa603e507e9380c2a7 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 13 Mar 2018 16:28:43 +0000 Subject: Fix bugs in msgcat that prevent clean test suite run. --- library/msgcat/msgcat.tcl | 2 +- tests/msgcat.test | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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}]} { -- cgit v0.12