34c34
< __FBSDID("$FreeBSD: head/tools/regression/lib/libc/locale/test-c16rtomb.c 250883 2013-05-21 19:59:37Z ed $");
---
> __FBSDID("$FreeBSD: head/tools/regression/lib/libc/locale/test-c16rtomb.c 251314 2013-06-03 17:17:56Z ed $");
84a85
> assert((unsigned char)buf[0] == 0xcc);
86a88,114
> * ISO8859-1.
> */
>
> assert(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-1"),
> "en_US.ISO8859-1") == 0);
>
> /* Unicode character 'Euro sign'. */
> memset(&s, 0, sizeof(s));
> memset(buf, 0xcc, sizeof(buf));
> assert(c16rtomb(buf, 0x20ac, &s) == (size_t)-1);
> assert(errno == EILSEQ);
> assert((unsigned char)buf[0] == 0xcc);
>
> /*
> * ISO8859-15.
> */
>
> assert(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-15"),
> "en_US.ISO8859-15") == 0);
>
> /* Unicode character 'Euro sign'. */
> memset(&s, 0, sizeof(s));
> memset(buf, 0xcc, sizeof(buf));
> assert(c16rtomb(buf, 0x20ac, &s) == 1);
> assert((unsigned char)buf[0] == 0xa4 && (unsigned char)buf[1] == 0xcc);
>
> /*
106a135
> assert((unsigned char)buf[0] == 0xcc);
112a142
> assert((unsigned char)buf[0] == 0xcc);
< __FBSDID("$FreeBSD: head/tools/regression/lib/libc/locale/test-c16rtomb.c 250883 2013-05-21 19:59:37Z ed $");
---
> __FBSDID("$FreeBSD: head/tools/regression/lib/libc/locale/test-c16rtomb.c 251314 2013-06-03 17:17:56Z ed $");
84a85
> assert((unsigned char)buf[0] == 0xcc);
86a88,114
> * ISO8859-1.
> */
>
> assert(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-1"),
> "en_US.ISO8859-1") == 0);
>
> /* Unicode character 'Euro sign'. */
> memset(&s, 0, sizeof(s));
> memset(buf, 0xcc, sizeof(buf));
> assert(c16rtomb(buf, 0x20ac, &s) == (size_t)-1);
> assert(errno == EILSEQ);
> assert((unsigned char)buf[0] == 0xcc);
>
> /*
> * ISO8859-15.
> */
>
> assert(strcmp(setlocale(LC_CTYPE, "en_US.ISO8859-15"),
> "en_US.ISO8859-15") == 0);
>
> /* Unicode character 'Euro sign'. */
> memset(&s, 0, sizeof(s));
> memset(buf, 0xcc, sizeof(buf));
> assert(c16rtomb(buf, 0x20ac, &s) == 1);
> assert((unsigned char)buf[0] == 0xa4 && (unsigned char)buf[1] == 0xcc);
>
> /*
106a135
> assert((unsigned char)buf[0] == 0xcc);
112a142
> assert((unsigned char)buf[0] == 0xcc);