diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2015-06-29 21:26:24 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2015-06-29 21:26:24 (GMT) |
commit | 352740916d2d2dea3a3c684445c25eb3cb190144 (patch) | |
tree | 6f4648cfbdafceea7207e7854f81c56916be0860 /library | |
parent | 52f920ba571f8037fea360dbc653364c054e2138 (diff) | |
download | tcl-352740916d2d2dea3a3c684445c25eb3cb190144.zip tcl-352740916d2d2dea3a3c684445c25eb3cb190144.tar.gz tcl-352740916d2d2dea3a3c684445c25eb3cb190144.tar.bz2 |
Added tests for mcforgetpackage, mcpackagelocale and mcpackageconfig
Diffstat (limited to 'library')
-rwxr-xr-x | library/msgcat/msgcat.tcl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/library/msgcat/msgcat.tcl b/library/msgcat/msgcat.tcl index 0991f1c..5ed9f3a 100755 --- a/library/msgcat/msgcat.tcl +++ b/library/msgcat/msgcat.tcl @@ -468,8 +468,9 @@ proc msgcat::mcpackagelocale {subcommand {locale ""}} { get { return [lindex [PackagePreferences $ns] 0] } preferences { return [PackagePreferences $ns] } loaded { return [PackageLocales $ns] } - isset { return [dict exists $PackageConfig loclist $ns] } - set { # set a package locale or add a package locale + present { return [expr {$locale in [PackageLocales $ns]} ]} + isset { return [dict exists $PackageConfig loclist $ns] } + set { # set a package locale or add a package locale # Copy the default locale if no package locale set so far if {![dict exists $PackageConfig loclist $ns]} { @@ -667,7 +668,7 @@ proc msgcat::mcpackageconfig {subcommand option {value ""}} { } default { return -code error "unknown subcommand \"$subcommand\":\ - must be get, isset, unset, or set" + must be get, isset, set, or unset" } } return |