1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
;;; test-funcname-at-point.el --- Test the repl functions -*- lexical-binding:t -*-
;;; Commentary:
;; Test functions to interact with the REPL.
;;; Code:
(describe "`lua-start-process'"
(it "doesn't hang for an already-running process"
;; Acquire a *lua* repl buffer
(save-current-buffer
(call-interactively #'lua-start-process)
;; Input some text
(with-current-buffer lua-process-buffer
(insert "table.insert"))
(switch-to-buffer (get-buffer-create "*scratch*"))
;; Try restarting the repl buffer
(call-interactively #'lua-start-process)
;; `lua-start-process' shouldn't hang, and it should have switched back.
(expect (current-buffer) :to-be lua-process-buffer))))
;;; test-process.el ends here
|