diff options
author | dgp <dgp@users.sourceforge.net> | 2012-09-12 19:15:20 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-09-12 19:15:20 (GMT) |
commit | 1119bed6a1c52797be5208f7a2870424efc8c341 (patch) | |
tree | 652755d228e540645881ef480a959702362b0882 /tests | |
parent | f343bffe1a52c61d61cb63fc2773d549dfb8d433 (diff) | |
parent | a7d4de2c279b775e84ac115f7b1450a31d5cd213 (diff) | |
download | tcl-1119bed6a1c52797be5208f7a2870424efc8c341.zip tcl-1119bed6a1c52797be5208f7a2870424efc8c341.tar.gz tcl-1119bed6a1c52797be5208f7a2870424efc8c341.tar.bz2 |
merge trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/msgcat.test | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/tests/msgcat.test b/tests/msgcat.test index bbcd023..d75bf8e 100644 --- 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.4.5}]} { - puts stderr "Skipping tests in [info script]. No msgcat 1.4.5 found to test." +if {[catch {package require msgcat 1.5.0}]} { + puts stderr "Skipping tests in [info script]. No msgcat 1.5.0 found to test." return } @@ -611,6 +611,46 @@ namespace eval ::msgcat::test { mc "this is a %s" "good test" } -result "this is a good test" + # Tests msgcat-8.*: [mcflset] + + set msgdir1 [makeDirectory msgdir1] + makeFile {::msgcat::mcflset k1 v1} l1.msg $msgdir1 + + test msgcat-8.1 {mcflset} -setup { + variable locale [mclocale] + mclocale l1 + mcload $msgdir1 + } -cleanup { + mclocale $locale + } -body { + mc k1 + } -result v1 + + removeFile l1.msg $msgdir1 + removeDirectory msgdir1 + + set msgdir2 [makeDirectory msgdir2] + set msgdir3 [makeDirectory msgdir3] + makeFile "::msgcat::mcflset k2 v2 ; ::msgcat::mcload [list $msgdir3]"\ + l2.msg $msgdir2 + makeFile {::msgcat::mcflset k3 v3} l2.msg $msgdir3 + + # chained mcload + test msgcat-8.2 {mcflset} -setup { + variable locale [mclocale] + mclocale l2 + mcload $msgdir2 + } -cleanup { + mclocale $locale + } -body { + return [mc k2][mc k3] + } -result v2v3 + + removeFile l2.msg $msgdir2 + removeDirectory msgdir2 + removeFile l3.msg $msgdir3 + removeDirectory msgdir3 + cleanupTests } namespace delete ::msgcat::test |