branch: elpa/lua-mode
commit b7938523c166aa89188224d1bb6f94b28871233c
Author: Nikita Bloshchanevich <[email protected]>
Commit: Nikita Bloshchanevich <[email protected]>

    Add regression test
---
 test/test-process.el | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/test/test-process.el b/test/test-process.el
new file mode 100644
index 0000000..a66bfcf
--- /dev/null
+++ b/test/test-process.el
@@ -0,0 +1,21 @@
+;;; test-funcname-at-point.el --- Test the repl functions
+
+;;; 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
+    (lua-start-process)
+    ;; Input some text
+    (with-current-buffer lua-process-buffer
+      (insert "table.insert"))
+    ;; Try restarting the repl buffer
+    (lua-start-process)
+    ;; `lua-start-process' shouldn't hang
+    (expect t)))
+
+;;; test-process.el ends here

Reply via email to