[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4bc2795: Stop emacsclient tests hanging (Bug#28319)
From: |
Reuben Thomas |
Subject: |
[Emacs-diffs] master 4bc2795: Stop emacsclient tests hanging (Bug#28319) |
Date: |
Fri, 1 Sep 2017 16:32:31 -0400 (EDT) |
branch: master
commit 4bc2795a401cf31fa8bb4d5a45698b181951786f
Author: Reuben Thomas <address@hidden>
Commit: Reuben Thomas <address@hidden>
Stop emacsclient tests hanging (Bug#28319)
* test/lib-src/emacsclient-tests.el
(emacsclient-test-alternate-editor-allows-arguments): Use a
non-existent file to communicate with server, so that any existing
default server will not be hijacked (in fact, the test does
not need a server).
(emacsclient-test-alternate-editor-allows-quotes): Likewise.
---
test/lib-src/emacsclient-tests.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/test/lib-src/emacsclient-tests.el
b/test/lib-src/emacsclient-tests.el
index ea757f6..e454e28 100644
--- a/test/lib-src/emacsclient-tests.el
+++ b/test/lib-src/emacsclient-tests.el
@@ -31,12 +31,18 @@
"lib-src"))
"Path to emacsclient binary in build tree.")
+(defun call-emacsclient ()
+ "Run emacsclient."
+ (call-process emacsclient-test-emacs nil nil nil
+ "--server-file" (expand-file-name "non-existent-file"
invocation-directory)
+ "foo"))
+
(ert-deftest emacsclient-test-alternate-editor-allows-arguments ()
(let (process-environment process-environment)
(setenv "ALTERNATE_EDITOR" (concat
(expand-file-name invocation-name
invocation-directory)
" --batch"))
- (should (= 0 (call-process emacsclient-test-emacs nil nil nil "foo")))))
+ (should (= 0 (call-emacsclient)))))
(ert-deftest emacsclient-test-alternate-editor-allows-quotes ()
(let (process-environment process-environment)
@@ -44,7 +50,7 @@
"\""
(expand-file-name invocation-name
invocation-directory)
"\"" " --batch"))
- (should (= 0 (call-process emacsclient-test-emacs nil nil nil "foo")))))
+ (should (= 0 (call-emacsclient)))))
(provide 'emacsclient-tests)
;;; emacsclient-tests.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4bc2795: Stop emacsclient tests hanging (Bug#28319),
Reuben Thomas <=