emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/lua-mode 1135932 435/468: test-process: check if the buffe


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 1135932 435/468: test-process: check if the buffer switching works
Date: Thu, 5 Aug 2021 04:59:24 -0400 (EDT)

branch: elpa/lua-mode
commit 1135932247cc71b90660d51fd494175f73ddbc17
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Nikita Bloshchanevich <nikblos@outlook.com>

    test-process: check if the buffer switching works
---
 test/test-process.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/test/test-process.el b/test/test-process.el
index a66bfcf..bedb11c 100644
--- a/test/test-process.el
+++ b/test/test-process.el
@@ -9,13 +9,16 @@
 (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)))
+    (save-current-buffer
+      (funcall-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
+      (funcall-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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]