File: test-process.el

package info (click to toggle)
lua-mode 20250310~git.2f6b8d7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 428 kB
  • sloc: lisp: 3,186; makefile: 40; sh: 21
file content (24 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (2)
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