9 # define OPEN_MEMSTREAM open_memstream
17 mcheck_abort (enum mcheck_status ev)
19 printf ("mecheck failed with status %d\n", (int) ev);
27 mcheck_pedantic (mcheck_abort);
29 CHAR_T *buf = (CHAR_T *) 1l;
31 FILE *fp = OPEN_MEMSTREAM (&buf, &len);
34 printf ("%s failed\n", S(OPEN_MEMSTREAM));
40 puts ("fflush failed");
46 puts ("string after no write not empty");
49 if (buf == (CHAR_T *) 1l)
51 puts ("buf not updated");
54 if (buf[0] != W('\0'))
64 puts ("fclose failed");
70 puts ("string after close with no write not empty");
73 if (buf == (CHAR_T *) 1l)
75 puts ("buf not updated");
78 if (buf[0] != W('\0'))
89 #define TEST_FUNCTION do_test ()
90 #include "../test-skeleton.c"