34c34
< __FBSDID("$FreeBSD: head/tools/regression/lib/libc/locale/test-mbrtoc16.c 250883 2013-05-21 19:59:37Z ed $");
---
> __FBSDID("$FreeBSD: head/tools/regression/lib/libc/locale/test-mbrtoc16.c 251314 2013-06-03 17:17:56Z ed $");
87a88,94
> /* Check that mbrtoc16() doesn't read ahead too aggressively. */
> memset(&s, 0, sizeof(s));
> assert(mbrtoc16(&c16, "AB", 2, &s) == 1);
> assert(c16 == L'A');
> assert(mbrtoc16(&c16, "C", 1, &s) == 1);
> assert(c16 == L'C');
>
88a96,119
> * ISO-8859-1.
> */
>
> assert(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-1"),
> "en_US.ISO8859-1") == 0);
>
> /* Currency sign. */
> memset(&s, 0, sizeof(s));
> assert(mbrtoc16(&c16, "\xa4", 1, &s) == 1);
> assert(c16 == 0xa4);
>
> /*
> * ISO-8859-15.
> */
>
> assert(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-15"),
> "en_US.ISO8859-15") == 0);
>
> /* Euro sign. */
> memset(&s, 0, sizeof(s));
> assert(mbrtoc16(&c16, "\xa4", 1, &s) == 1);
> assert(c16 == 0x20ac);
>
> /*
146a178,191
> /* Letter e with acute, precomposed. */
> memset(&s, 0, sizeof(s));
> c16 = 0;
> assert(mbrtoc16(&c16, "\xc3\xa9", 2, &s) == 2);
> assert(c16 == 0xe9);
>
> /* Letter e with acute, combined. */
> memset(&s, 0, sizeof(s));
> c16 = 0;
> assert(mbrtoc16(&c16, "\x65\xcc\x81", 3, &s) == 1);
> assert(c16 == 0x65);
> assert(mbrtoc16(&c16, "\xcc\x81", 2, &s) == 2);
> assert(c16 == 0x301);
>
< __FBSDID("$FreeBSD: head/tools/regression/lib/libc/locale/test-mbrtoc16.c 250883 2013-05-21 19:59:37Z ed $");
---
> __FBSDID("$FreeBSD: head/tools/regression/lib/libc/locale/test-mbrtoc16.c 251314 2013-06-03 17:17:56Z ed $");
87a88,94
> /* Check that mbrtoc16() doesn't read ahead too aggressively. */
> memset(&s, 0, sizeof(s));
> assert(mbrtoc16(&c16, "AB", 2, &s) == 1);
> assert(c16 == L'A');
> assert(mbrtoc16(&c16, "C", 1, &s) == 1);
> assert(c16 == L'C');
>
88a96,119
> * ISO-8859-1.
> */
>
> assert(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-1"),
> "en_US.ISO8859-1") == 0);
>
> /* Currency sign. */
> memset(&s, 0, sizeof(s));
> assert(mbrtoc16(&c16, "\xa4", 1, &s) == 1);
> assert(c16 == 0xa4);
>
> /*
> * ISO-8859-15.
> */
>
> assert(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-15"),
> "en_US.ISO8859-15") == 0);
>
> /* Euro sign. */
> memset(&s, 0, sizeof(s));
> assert(mbrtoc16(&c16, "\xa4", 1, &s) == 1);
> assert(c16 == 0x20ac);
>
> /*
146a178,191
> /* Letter e with acute, precomposed. */
> memset(&s, 0, sizeof(s));
> c16 = 0;
> assert(mbrtoc16(&c16, "\xc3\xa9", 2, &s) == 2);
> assert(c16 == 0xe9);
>
> /* Letter e with acute, combined. */
> memset(&s, 0, sizeof(s));
> c16 = 0;
> assert(mbrtoc16(&c16, "\x65\xcc\x81", 3, &s) == 1);
> assert(c16 == 0x65);
> assert(mbrtoc16(&c16, "\xcc\x81", 2, &s) == 2);
> assert(c16 == 0x301);
>