diff options
Diffstat (limited to 'ci')
| -rw-r--r-- | ci/coq-tests.el | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/ci/coq-tests.el b/ci/coq-tests.el index 057f918e..616e3cd4 100644 --- a/ci/coq-tests.el +++ b/ci/coq-tests.el @@ -9,7 +9,7 @@ (setq debug-on-error t) ; open the debugger on error -- may be commented-out -(require 'ert-async) +; (require 'ert-async) ;(setq ert-async-timeout 2) ;;; Code: @@ -57,6 +57,8 @@ "Exit the Coq process." (proof-shell-exit t)) + + ;; AVOID THE FOLLOWING ERROR: ;; Starting: -emacs ;; Debugger entered--Lisp error: (wrong-type-argument stringp nil) @@ -123,12 +125,25 @@ #'proof-done-invisible 'no-error-display 'no-response-display 'no-goals-display))) +; Fixture for init and exit coq +(defun coq-init-exit (body) + (unwind-protect + (progn (coq-test-init) + (funcall body)) + (coq-test-exit))) + (defun coq-test-001 () ;; TODO: retrieve the test status, maybe by changing the function above - (coq-test-cmd "Print nat.")) + (coq-test-cmd (process-list))) ;; TODO: Use https://github.com/rejeep/ert-async.el ;; and/or ERT https://www.gnu.org/software/emacs/manual/html_node/ert/index.html +(ert-deftest coq-test-running () + (coq-init-exit + (lambda () + (coq-test-cmd "Check 0.") + (should (get-process "coq"))))) + (defun coq-test-main () (coq-mock #'coq-test-001)) |
