Test for proper handling of 8-bit characters in strings.

Reported by Per Hedbor <per@idonex.se>.

From-SVN: r32221
This commit is contained in:
Zack Weinberg 2000-02-27 17:17:01 +00:00
parent 6e38f244c4
commit 6b27a7c45b

View File

@ -0,0 +1,15 @@
static const unsigned char f[] = "\0\377";
static const unsigned char g[] = "\0ÿ";
int main(void)
{
if (sizeof f != 3 || sizeof g != 3)
abort ();
if (f[0] != g[0])
abort ();
if (f[1] != g[1])
abort ();
if (f[2] != g[2])
abort ();
return 0;
}