summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorBen Kaduk <kaduk@mit.edu>2012-07-05 14:56:50 -0400
committerBen Kaduk <kaduk@mit.edu>2012-07-06 14:06:12 -0400
commit75c7c600b49a7f1d5cf95260fc073cb4ba5929cd (patch)
tree46bcba94693b0171533a55a7d0eee54c0bf35306 /src/tests
parent1df4d98ca14d884808b1d4f746edd4c7f55dbd7e (diff)
downloadkrb5-75c7c600b49a7f1d5cf95260fc073cb4ba5929cd.tar.gz
krb5-75c7c600b49a7f1d5cf95260fc073cb4ba5929cd.tar.xz
krb5-75c7c600b49a7f1d5cf95260fc073cb4ba5929cd.zip
Enable all localizations in main functions
Bite the bullet and pass LC_ALL to setlocale() instead of just LC_MESSAGES. Calls to setlocale() itself were introduced in fabbf9e443459e8c0161c84563690ed70c7f6a61 for ticket 6918, but only for LC_MESSAGES since only localized strings were needed and that was the most conservative option. However, klist, kadmin, and kinit (and perhaps others) would benefit from localized formats for times (i.e., LC_TIME). If potentially localized data is being sent on the wire, that is a bug that should be fixed. No such bugs are found with the current test suite, so we are comfortable enabling LC_ALL at this time. ticket: 7192
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/dejagnu/config/default.exp7
-rw-r--r--src/tests/misc/test_chpw_message.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp
index 192ac6da9..c906bf109 100644
--- a/src/tests/dejagnu/config/default.exp
+++ b/src/tests/dejagnu/config/default.exp
@@ -643,9 +643,10 @@ foreach i $runvarlist {
verbose "savelist $envvars_tosave"
lappend krb5_init_vars $i
}
- # Make sure we don't get confused by translated messages.
- lappend envvars_tosave "LC_MESSAGES"
- lappend krb5_init_vars "LC_MESSAGES=C"
+ # Make sure we don't get confused by translated messages
+ # or localized times.
+ lappend envvars_tosave "LC_ALL"
+ lappend krb5_init_vars "LC_ALL=C"
}
set envstackp 0
envstack_push
diff --git a/src/tests/misc/test_chpw_message.c b/src/tests/misc/test_chpw_message.c
index aef96b13f..ba6fa187f 100644
--- a/src/tests/misc/test_chpw_message.c
+++ b/src/tests/misc/test_chpw_message.c
@@ -116,7 +116,7 @@ main(void)
krb5_context context;
char *msg;
- setlocale(LC_MESSAGES, "C");
+ setlocale(LC_ALL, "C");
check(krb5_init_context(&context));