Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Jan 26, 2025
1 parent b32d449 commit 4c74451
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion toplevel/test/test_toplevel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ let () = Js_of_ocaml_toplevel.JsooTop.initialize ()
let fmt = Format.std_formatter

let () =
Js_of_ocaml.Sys_js.set_channel_flusher stderr (fun str -> Printf.printf "<ERR>: %s" str)
Js_of_ocaml.Sys_js.set_channel_flusher stderr (fun str ->
let rec iter = function
| [] -> ()
| [ "" ] -> ()
| [ x ] -> Printf.printf "<ERR>: %s" x
| x :: xs ->
Printf.printf "<ERR>: %s\n" x;
iter xs
in
iter (String.split_on_char '\n' str))

let () =
Js_of_ocaml_toplevel.JsooTop.execute
Expand Down

0 comments on commit 4c74451

Please sign in to comment.