8 # define OPEN_MEMSTREAM open_memstream
16 mcheck_abort (enum mcheck_status ev
)
18 printf ("mecheck failed with status %d\n", (int) ev
);
26 mcheck_pedantic (mcheck_abort
);
28 CHAR_T
*buf
= (CHAR_T
*) 1l;
30 FILE *fp
= OPEN_MEMSTREAM (&buf
, &len
);
33 printf ("%s failed\n", S(OPEN_MEMSTREAM
));
39 puts ("fflush failed");
45 puts ("string after no write not empty");
48 if (buf
== (CHAR_T
*) 1l)
50 puts ("buf not updated");
53 if (buf
[0] != W('\0'))
63 puts ("fclose failed");
69 puts ("string after close with no write not empty");
72 if (buf
== (CHAR_T
*) 1l)
74 puts ("buf not updated");
77 if (buf
[0] != W('\0'))
88 #define TEST_FUNCTION do_test ()
89 #include "../test-skeleton.c"