From 7f4553513cc2e247fa40ba80485f41e942ba6c9b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Jul 2000 00:04:28 +0000 Subject: Update. * iconv/gconv_trans.c: Test with _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN whether this information is available. * intl/dcigettext.c (_nl_find_msg): Correct reallocation of buffers in case the translation is too large. Remember allocated memory blocks in a list. (free_mem): Free memory for translations. * intl/tst-gettext.c: Use correct locale. Improve error messages. * locale/programs/ld-ctype.c (ctype_output): If no default_missing information is available set the string length to zero. --- intl/tst-gettext.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'intl/tst-gettext.c') diff --git a/intl/tst-gettext.c b/intl/tst-gettext.c index d9f9718..688acbf 100644 --- a/intl/tst-gettext.c +++ b/intl/tst-gettext.c @@ -71,7 +71,7 @@ main (int argc, char *argv[]) setenv ("LC_MESSAGES", "non-existing-locale", 1); setenv ("LC_CTYPE", "non-existing-locale", 1); setenv ("LANG", "non-existing-locale", 1); - setlocale (LC_CTYPE, "de_DE"); + setlocale (LC_CTYPE, "de_DE.ISO-8859-1"); unsetenv ("OUTPUT_CHARSET"); /* This is the name of the existing domain with a catalog for the LC_MESSAGES category. */ @@ -225,8 +225,9 @@ positive_gettext_test (void) if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0) { /* Oops, shouldn't happen. */ - printf (" gettext (\"%s\") failed, returned \"%s\"\n", - msgs[cnt].msgid, found); + printf ("\ + gettext (\"%s\") failed, returned \"%s\", expected \"%s\"\n", + msgs[cnt].msgid, found, msgs[cnt].msgstr); result = 1; } } @@ -270,8 +271,9 @@ positive_dgettext_test (const char *domain) if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0) { /* Oops, shouldn't happen. */ - printf (" dgettext (\"%s\", \"%s\") failed, returned \"%s\"\n", - domain, msgs[cnt].msgid, found); + printf ("\ + dgettext (\"%s\", \"%s\") failed, returned \"%s\", expected \"%s\"\n", + domain, msgs[cnt].msgid, found, msgs[cnt].msgstr); result = 1; } } @@ -293,8 +295,10 @@ positive_dcgettext_test (const char *domain, int category) if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0) { /* Oops, shouldn't happen. */ - printf (" dcgettext (\"%s\", \"%s\", %s) failed, returned \"%s\"\n", - domain, msgs[cnt].msgid, catname[category], found); + printf ("\ + dcgettext (\"%s\", \"%s\", %s) failed, returned \"%s\", expected \"%s\"\n", + domain, msgs[cnt].msgid, catname[category], found, + msgs[cnt].msgstr); result = 1; } } -- cgit v1.1