diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-10-31 03:10:13 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-10-31 03:10:13 +0000 |
commit | cdfb970dd9c20861d7fdac16435d70792b8a027a (patch) | |
tree | dfa5497c0b5b06408284073aa184688091b065c4 /intl/tst-gettext.c | |
parent | 42fea164a2f975da1b1bb687bf1a50506b59a668 (diff) | |
download | glibc-cdfb970dd9c20861d7fdac16435d70792b8a027a.tar.gz |
Update.
* locale/findlocale.c (free_mem): We can remove NODELETE marked
data, just not the C locale data.
* intl/tst-gettext.c: Use setlocale() in addition to setting envvar.
* intl/tst-gettext.sh: Copy locale data if necessary.
* intl/Makefile (generated-dirs): Add localedir.
* intl/dcigettext.c (guess_category_value): For libc always use
the setlocale() method.
* intl/Makefile: Add rules to build, run and, distribute tst-gettext2.
* intl/tst-gettext2.c: New file.
* intl/tst-gettext2.sh: New file.
* intl/tstlang1.po: New file.
* intl/tstlang2.po: New file.
Patch by Andreas Jaeger <aj@suse.de>.
2000-10-26 GOTO Masanori <gotom@debian.or.jp>
* intl/locale.alias: Add ja_JP.ujis alias.
2000-10-30 Ulrich Drepper <drepper@redhat.com>
Diffstat (limited to 'intl/tst-gettext.c')
-rw-r--r-- | intl/tst-gettext.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/intl/tst-gettext.c b/intl/tst-gettext.c index cfd2d5fc53..a83b1d25bd 100644 --- a/intl/tst-gettext.c +++ b/intl/tst-gettext.c @@ -106,6 +106,7 @@ main (int argc, char *argv[]) /* Now the same tests with LC_ALL deciding. */ unsetenv ("LANGUAGE"); setenv ("LC_ALL", "existing-locale", 1); + setlocale (LC_ALL, ""); puts ("test `gettext' with LC_ALL set"); /* This is the name of the existing domain with a catalog for the LC_MESSAGES category. */ @@ -119,13 +120,13 @@ main (int argc, char *argv[]) LC_MESSAGES category. We leave this value set for the `dgettext' and `dcgettext' tests. */ textdomain ("non-existing-domain"); - puts ("test `gettext' with LANGUAGE set"); + puts ("test `gettext' with LC_ALL deciding"); if (negative_gettext_test () != 0) { puts ("FAILED"); result = 1; } - puts ("test `dgettext' with LANGUAGE set"); + puts ("test `dgettext' with LC_ALL deciding"); if (positive_dgettext_test ("existing-domain") != 0) { puts ("FAILED"); @@ -135,8 +136,11 @@ main (int argc, char *argv[]) /* Now the same tests with LC_MESSAGES deciding. */ unsetenv ("LC_ALL"); setenv ("LC_MESSAGES", "existing-locale", 1); + setlocale (LC_MESSAGES, ""); setenv ("LC_TIME", "existing-locale", 1); + setlocale (LC_TIME, ""); setenv ("LC_NUMERIC", "non-existing-locale", 1); + setlocale (LC_NUMERIC, ""); puts ("test `gettext' with LC_ALL set"); /* This is the name of the existing domain with a catalog for the LC_MESSAGES category. */ @@ -150,33 +154,33 @@ main (int argc, char *argv[]) LC_MESSAGES category. We leave this value set for the `dgettext' and `dcgettext' tests. */ textdomain ("non-existing-domain"); - puts ("test `gettext' with LANGUAGE set"); + puts ("test `gettext' with LC_xxx deciding"); if (negative_gettext_test () != 0) { puts ("FAILED"); result = 1; } - puts ("test `dgettext' with LANGUAGE set"); + puts ("test `dgettext' with LC_xxx deciding"); if (positive_dgettext_test ("existing-domain") != 0) { puts ("FAILED"); result = 1; } - puts ("test `dcgettext' with LANGUAGE set (LC_MESSAGES)"); + puts ("test `dcgettext' with category == LC_MESSAGES"); if (positive_dcgettext_test ("existing-domain", LC_MESSAGES) != 0) { puts ("FAILED"); result = 1; } /* Try a different category. For this we also switch the domain. */ - puts ("test `dcgettext' with LANGUAGE set (LC_TIME)"); + puts ("test `dcgettext' with LANGUAGE == LC_TIME"); if (positive_dcgettext_test ("existing-time-domain", LC_TIME) != 0) { puts ("FAILED"); result = 1; } /* This time use a category for which there is no catalog. */ - puts ("test `dcgettext' with LANGUAGE set (LC_NUMERIC)"); + puts ("test `dcgettext' with LANGUAGE == LC_NUMERIC"); if (negative_dcgettext_test ("existing-domain", LC_NUMERIC) != 0) { puts ("FAILED"); @@ -186,10 +190,11 @@ main (int argc, char *argv[]) /* Now the same tests with LANG deciding. */ unsetenv ("LC_MESSAGES"); setenv ("LANG", "existing-locale", 1); + setlocale (LC_ALL, ""); /* This is the name of the existing domain with a catalog for the LC_MESSAGES category. */ textdomain ("existing-domain"); - puts ("test `gettext' with LC_ALL set"); + puts ("test `gettext' with LANG set"); if (positive_gettext_test () != 0) { puts ("FAILED"); @@ -199,19 +204,21 @@ main (int argc, char *argv[]) LC_MESSAGES category. We leave this value set for the `dgettext' and `dcgettext' tests. */ textdomain ("non-existing-domain"); - puts ("test `gettext' with LANGUAGE set"); + puts ("test `gettext' with LANG set"); if (negative_gettext_test () != 0) { puts ("FAILED"); result = 1; } - puts ("test `dgettext' with LANGUAGE set"); + puts ("test `dgettext' with LANG set"); if (positive_dgettext_test ("existing-domain") != 0) { puts ("FAILED"); result = 1; } + setlocale (LC_ALL, "C"); + return result; } |