/* Test of gl_locale_name function and its variants.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
/* Verify the unsaved_names are still valid. */
for (j = 0; j < SIZEOF (choices); j++)
- {
- unsigned int i;
+ if (available[j])
+ {
+ unsigned int i;
- for (i = 0; i < SIZEOF (categories); i++)
- ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
- }
+ for (i = 0; i < SIZEOF (categories); i++)
+ ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+ }
/* Allocate many locales, without freeing them. This is an attempt at
overwriting as much of the previously allocated memory as possible. */
for (j = SIZEOF (choices); j > 0; )
}
/* Verify the unsaved_names are still valid. */
for (j = 0; j < SIZEOF (choices); j++)
- {
- unsigned int i;
+ if (available[j])
+ {
+ unsigned int i;
- for (i = 0; i < SIZEOF (categories); i++)
- ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
- }
+ for (i = 0; i < SIZEOF (categories); i++)
+ ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+ }
}
#else
/* Check that gl_locale_name_thread always returns NULL. */
ASSERT (name != NULL);
- /* Only MacOS X and Windows have a facility for the user to set the default
+ /* Only Mac OS X and Windows have a facility for the user to set the default
locale. */
#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__))
ASSERT (strcmp (name, "C") == 0);