13 stream
= open_memstream (&bp
, &size
);
14 fprintf (stream
, "hello");
16 printf ("buf = %s, size = %d\n", bp
, size
);
18 lose
|= strncmp (bp
, "hello", size
);
19 fprintf (stream
, ", world");
21 printf ("buf = %s, size = %d\n", bp
, size
);
23 lose
|= strncmp (bp
, "hello, world", 12);
25 puts (lose
? "Test FAILED!" : "Test succeeded.");