diff options
author | ericm <ericm> | 2000-07-17 22:25:25 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-07-17 22:25:25 (GMT) |
commit | e58ac604378b855c137c05576fd796df952cb349 (patch) | |
tree | 4aaf12e0f958eefbadbedaafe08b0bd0d6340cbe /tests | |
parent | 247225ff4ff6cee54489ee55dc9911d459e1003d (diff) | |
download | tcl-e58ac604378b855c137c05576fd796df952cb349.zip tcl-e58ac604378b855c137c05576fd796df952cb349.tar.gz tcl-e58ac604378b855c137c05576fd796df952cb349.tar.bz2 |
* library/msgcat1.0/msgcat.tcl:
* doc/msgcat.n:
* tests/msgcat.test: Applied patches from Chris Nelson, to provide
the mcmset function, which allows the translator to set multiple
string translations in a single function call, rather than
requiring many calls to mcset. [RFE: 6000, 5993]. In addition,
these patches correct mcload to use utf-8 encoding on when reading
message catalog files, and provides for better default behavior
for determining the locale on a Windows system.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/msgcat.test | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/msgcat.test b/tests/msgcat.test index cdb42ac..633c869 100644 --- a/tests/msgcat.test +++ b/tests/msgcat.test @@ -1,6 +1,6 @@ # Commands covered: ::msgcat::mc ::msgcat::mclocale # ::msgcat::mcpreferences ::msgcat::mcload -# ::msgcat::mcset ::msgcat::mcunknown +# ::msgcat::mcset ::msgcat::mcmset ::msgcat::mcunknown # # This file contains a collection of tests for the msgcat script library. # Sourcing this file into Tcl runs the tests and @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: msgcat.test,v 1.9 2000/07/06 21:05:02 ericm Exp $ +# RCS: @(#) $Id: msgcat.test,v 1.10 2000/07/17 22:25:26 ericm Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -84,7 +84,7 @@ test msgcat-1.11 {::msgcat::mcpreferences, three elements} { } {en_us_funky en_us en} # -# Test mcset and mcc, ensuring that namespace partitioning +# Test mcset and mc, ensuring that namespace partitioning # is working. # @@ -106,6 +106,22 @@ test msgcat-2.4 {::msgcat::mcset, namespace overlap} { ::msgcat::mclocale foo_BAR namespace eval baz {::msgcat::mc con1} } {con1baz} +test msgcat-2.5 {::msgcat::mcmset, global scope} { + ::msgcat::mcmset foo_BAR { + src1 trans1 + src2 trans2 + } + ::msgcat::mc src1 +} {trans1} +test msgcat-2.6 {::msgcat::mcmset, namespace overlap} { + namespace eval bar {::msgcat::mcmset foo_BAR {con2 con2bar}} + namespace eval baz {::msgcat::mcmset foo_BAR {con2 con2baz}} +} {2} +test msgcat-2.7 {::msgcat::mcmset, namespace overlap} { + ::msgcat::mclocale foo_BAR + namespace eval baz {::msgcat::mc con2} +} {con2baz} + # # Test mcset and mc, ensuring that more specific locales |