diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2018-02-08 09:49:28 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2018-02-08 09:49:28 (GMT) |
commit | 4cff9271ac34377ccf2717fcb47f3c0adc8b58ee (patch) | |
tree | c148344773c8d71afbda59c94376d0f470c68100 /tests/msgcat.test | |
parent | 3f2c5cd5aa8381ad73336403f1ff98a52230726f (diff) | |
download | tcl-4cff9271ac34377ccf2717fcb47f3c0adc8b58ee.zip tcl-4cff9271ac34377ccf2717fcb47f3c0adc8b58ee.tar.gz tcl-4cff9271ac34377ccf2717fcb47f3c0adc8b58ee.tar.bz2 |
Add subcommand mcpreferences to export getpreferences and getsystemlocale functions
Diffstat (limited to 'tests/msgcat.test')
-rwxr-xr-x | tests/msgcat.test | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/msgcat.test b/tests/msgcat.test index b0d2bd3..7a095a6 100755 --- a/tests/msgcat.test +++ b/tests/msgcat.test @@ -1126,6 +1126,41 @@ namespace eval ::msgcat::test { interp bgerror {} $bgerrorsaved + # Tests msgcat-15.*: [mcutil] + + test msgcat-15.1 {mcutil - no argument} -body { + mcutil + } -returnCodes 1\ + -result {wrong # args: should be "mcutil subcommand ?arg ...?"} + + test msgcat-15.2 {mcutil - wrong argument} -body { + mcutil junk + } -returnCodes 1\ + -result {unknown or ambiguous subcommand "junk": must be getpreferences, or getsystemlocale} + + test msgcat-15.3 {mcutil getpreferences - no argument} -body { + mcutil getpreferences + } -returnCodes 1\ + -result {wrong # args: should be "mcutil getpreferences locale"} + + test msgcat-15.4 {mcutil getpreferences - DE_de} -body { + mcutil getpreferences DE_de + } -result {de_de de {}} + + test msgcat-15.5 {mcutil getsystemlocale - wrong argument} -body { + mcutil getsystemlocale DE_de + } -returnCodes 1\ + -result {wrong # args: should be "mcutil getsystemlocale"} + + # The result is system dependent + # So just test if it runs + # The environment variable version was test with test 0.x + test msgcat-15.6 {mcutil getsystemlocale} -body { + mcutil getsystemlocale + set ok ok + } -result {ok} + + cleanupTests } namespace delete ::msgcat::test |