summaryrefslogtreecommitdiffstats
path: root/tests/msgcat.test
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>2000-07-17 22:25:25 (GMT)
committerericm <ericm@noemail.net>2000-07-17 22:25:25 (GMT)
commitde2250c38284b83b2550d3ad831d54d76b153e0e (patch)
tree4aaf12e0f958eefbadbedaafe08b0bd0d6340cbe /tests/msgcat.test
parent3f784a4736109ed358e1378668806a3a411d8d50 (diff)
downloadtcl-de2250c38284b83b2550d3ad831d54d76b153e0e.zip
tcl-de2250c38284b83b2550d3ad831d54d76b153e0e.tar.gz
tcl-de2250c38284b83b2550d3ad831d54d76b153e0e.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. FossilOrigin-Name: 3ad3252f556dddad29e7d484185cae63b065edeb
Diffstat (limited to 'tests/msgcat.test')
-rw-r--r--tests/msgcat.test22
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