1 (* Test the Format module, which we suspect may not be working. *)
8 if debug then Printf.printf "creating buffer ...\n%!";
9 let buf = Buffer.create 100 in
10 if debug then Printf.printf "creating formatter ...\n%!";
11 let fmt = formatter_of_buffer buf in
12 if debug then Printf.printf "open box ...\n%!";
14 if debug then Printf.printf "print string ...\n%!";
15 pp_print_string fmt "This is a string";
16 if debug then Printf.printf "close box ...\n%!";
18 if debug then Printf.printf "flush ...\n%!";
19 pp_print_flush fmt ();
20 if debug then Printf.printf "get buffer contents ...\n%!";
21 let str = Buffer.contents buf in
22 Printf.printf "contents of buffer = %S\n%!" str