From 97895a4fdceee8f6b1eaea4253bb6dbffb9c9360 Mon Sep 17 00:00:00 2001 From: oehhar Date: Mon, 1 Jun 2015 15:16:58 +0000 Subject: Make all msgcat tests pass --- library/msgcat/msgcat.tcl | 2 +- tests/msgcat.test | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) mode change 100644 => 100755 tests/msgcat.test diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index b217634..228ac97 100755 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -435,7 +435,7 @@ proc msgcat::mcloadedlocales {subcommand} { # default data, if no package locale is set. # # Arguments: -# subcommand One of get, init, present, add or remove +# subcommand see list above # locale package locale (only set subcommand) # # Results: diff --git a/tests/msgcat.test b/tests/msgcat.test old mode 100644 new mode 100755 index 050b592..8fd94e1 --- a/tests/msgcat.test +++ b/tests/msgcat.test @@ -17,8 +17,8 @@ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." return } -if {[catch {package require msgcat 1.5}]} { - puts stderr "Skipping tests in [info script]. No msgcat 1.5 found to test." +if {[catch {package require msgcat 1.6}]} { + puts stderr "Skipping tests in [info script]. No msgcat 1.6 found to test." return } @@ -412,9 +412,14 @@ namespace eval ::msgcat::test { foreach loc {foo foo_BAR foo_BAR_baz} { test msgcat-5.$count {mcload} -setup { variable locale [mclocale] + ::msgcat::mclocale "" + ::msgcat::mcloadedlocales clear + ::msgcat::mcpackageconfig unset mcfolder mclocale $loc } -cleanup { mclocale $locale + ::msgcat::mcloadedlocales clear + ::msgcat::mcpackageconfig unset mcfolder } -body { mcload $msgdir } -result [expr { $count+1 }] @@ -428,6 +433,8 @@ namespace eval ::msgcat::test { mclocale foo_BAR_notexist } -cleanup { mclocale $locale + ::msgcat::mcloadedlocales clear + ::msgcat::mcpackageconfig unset mcfolder } -body { mcload $msgdir } -result 3 @@ -437,6 +444,8 @@ namespace eval ::msgcat::test { mclocale no_FI_notexist } -cleanup { mclocale $locale + ::msgcat::mcloadedlocales clear + ::msgcat::mcpackageconfig unset mcfolder } -body { mcload $msgdir } -result 1 -- cgit v0.12