diff options
| author | Reuben Thomas | 2017-09-01 21:21:38 +0100 |
|---|---|---|
| committer | Reuben Thomas | 2017-09-01 21:32:12 +0100 |
| commit | 4bc2795a401cf31fa8bb4d5a45698b181951786f (patch) | |
| tree | e9876654a455b15a33c36b9063e8be45038695f0 /test/lib-src | |
| parent | c4ccafb1a59677c669519575b47d20f3ed4bacb3 (diff) | |
| download | emacs-4bc2795a401cf31fa8bb4d5a45698b181951786f.tar.gz emacs-4bc2795a401cf31fa8bb4d5a45698b181951786f.zip | |
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.
Diffstat (limited to 'test/lib-src')
| -rw-r--r-- | test/lib-src/emacsclient-tests.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/lib-src/emacsclient-tests.el b/test/lib-src/emacsclient-tests.el index ea757f69144..e454e2825e6 100644 --- a/test/lib-src/emacsclient-tests.el +++ b/test/lib-src/emacsclient-tests.el | |||
| @@ -31,12 +31,18 @@ | |||
| 31 | "lib-src")) | 31 | "lib-src")) |
| 32 | "Path to emacsclient binary in build tree.") | 32 | "Path to emacsclient binary in build tree.") |
| 33 | 33 | ||
| 34 | (defun call-emacsclient () | ||
| 35 | "Run emacsclient." | ||
| 36 | (call-process emacsclient-test-emacs nil nil nil | ||
| 37 | "--server-file" (expand-file-name "non-existent-file" invocation-directory) | ||
| 38 | "foo")) | ||
| 39 | |||
| 34 | (ert-deftest emacsclient-test-alternate-editor-allows-arguments () | 40 | (ert-deftest emacsclient-test-alternate-editor-allows-arguments () |
| 35 | (let (process-environment process-environment) | 41 | (let (process-environment process-environment) |
| 36 | (setenv "ALTERNATE_EDITOR" (concat | 42 | (setenv "ALTERNATE_EDITOR" (concat |
| 37 | (expand-file-name invocation-name invocation-directory) | 43 | (expand-file-name invocation-name invocation-directory) |
| 38 | " --batch")) | 44 | " --batch")) |
| 39 | (should (= 0 (call-process emacsclient-test-emacs nil nil nil "foo"))))) | 45 | (should (= 0 (call-emacsclient))))) |
| 40 | 46 | ||
| 41 | (ert-deftest emacsclient-test-alternate-editor-allows-quotes () | 47 | (ert-deftest emacsclient-test-alternate-editor-allows-quotes () |
| 42 | (let (process-environment process-environment) | 48 | (let (process-environment process-environment) |
| @@ -44,7 +50,7 @@ | |||
| 44 | "\"" | 50 | "\"" |
| 45 | (expand-file-name invocation-name invocation-directory) | 51 | (expand-file-name invocation-name invocation-directory) |
| 46 | "\"" " --batch")) | 52 | "\"" " --batch")) |
| 47 | (should (= 0 (call-process emacsclient-test-emacs nil nil nil "foo"))))) | 53 | (should (= 0 (call-emacsclient))))) |
| 48 | 54 | ||
| 49 | (provide 'emacsclient-tests) | 55 | (provide 'emacsclient-tests) |
| 50 | ;;; emacsclient-tests.el ends here | 56 | ;;; emacsclient-tests.el ends here |