(* The inspector and the break buffer, driven from fixtures. Unlike test_emacs.ml there is no daemon and no running program behind this, and that is the point rather than a shortcut. Both buffers are functions from a reply's data to text with properties on it, and every interesting way they can be wrong is on that side: a struct the reader mis-parses, a shadowed restart drawn as though it could be taken, a section quietly omitted where it should have been refused. Fixtures also reach the states a live program is hard to hold still in — a value past the renderer's depth bound, two restarts sharing a name, a frame with locals in it at all. Skipped, not failed, where there is no emacs: the compiler does not depend on one. *) (* The watchdog first: a hang is the one failure mode that reports nothing at all. See watchdog.ml. *) let () = Watchdog.arm ~seconds:600 "test_cider" let () = if Sys.command "command -v emacs > /dev/null 2>&1" <> 0 then print_endline "cider: skipped (no emacs on PATH)" else let code = Sys.command "emacs -Q --batch -L ../../../emacs -l ../../../emacs/test-flan-cider.el 2>&1" in if code = 0 then print_endline "cider: all tests passed" else begin Printf.printf "\nthe inspector/break buffer tests exited %d\n" code; exit 1 end