/* Test of the gettext functions.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
{
const char *found = gettext (msgs[cnt].msgid);
- if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0)
+ if (found == NULL
+ || (msgs[cnt].msgstr[0] != '\0'
+ && strcmp (found, msgs[cnt].msgstr) != 0))
{
/* Oops, shouldn't happen. */
printf ("\
{
const char *found = dgettext (domain, msgs[cnt].msgid);
- if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0)
+ if (found == NULL
+ || (msgs[cnt].msgstr[0] != '\0'
+ && strcmp (found, msgs[cnt].msgstr) != 0))
{
/* Oops, shouldn't happen. */
printf ("\
{
const char *found = dcgettext (domain, msgs[cnt].msgid, category);
- if (found == NULL || strcmp (found, msgs[cnt].msgstr) != 0)
+ if (found == NULL
+ || (msgs[cnt].msgstr[0] != '\0'
+ && strcmp (found, msgs[cnt].msgstr) != 0))
{
/* Oops, shouldn't happen. */
printf ("\