Fix charset and drop debug output in gnulib-test-btwoc.

This commit is contained in:
Oliver Tappe 2011-11-22 13:28:23 +01:00
parent a8eaac6934
commit fc4fa46848
1 changed files with 2 additions and 5 deletions

View File

@ -56,18 +56,15 @@ main (int argc, char *argv[])
/* Locale encoding is UTF-8. */
printf("UTF-8 ...\n");
if (setlocale (LC_ALL, "en_US.ISO8859-1") == NULL) {
fprintf(stderr, "unable to set ISO8859-1 locale, skipping\n");
if (setlocale (LC_ALL, "en_US.utf-8") == NULL) {
fprintf(stderr, "unable to set en_US.UTF-8 locale, skipping\n");
break;
}
for (c = 0; c < 0x80; c++)
assert (btowc (c) == (wint_t)c);
for (c = 0x80; c < 0x100; c++)
{
printf("btowc(%d) = %x\n", c, btowc(c));
assert (btowc (c) == WEOF);
}
break;
}
}