diff options
| author | Michael Albinus | 2022-12-13 20:06:48 +0100 |
|---|---|---|
| committer | Michael Albinus | 2023-06-19 19:56:42 +0200 |
| commit | c5f819aa03427c0e2b86131d44fa55874da2b03e (patch) | |
| tree | a7998d65c5f6879955779909796516d1f2597b2d | |
| parent | 075e77ac449386c07a4b90e052d1bef7c6a38771 (diff) | |
| download | emacs-c5f819aa03427c0e2b86131d44fa55874da2b03e.tar.gz emacs-c5f819aa03427c0e2b86131d44fa55874da2b03e.zip | |
Adapt Tramp specific tests in eglot-tests.el
* test/lisp/progmodes/eglot-tests.el (tramp): Move up.
(tramp-sh): Don't require.
(eglot--cleanup-after-test): Delete Tramp buffers if needed.
(eglot-tests-lsp-abiding-column): Rename from `eglot-lsp-abiding-column'.
(tramp-histfile-override): Declare.
(eglot--call-with-tramp-test):
Use `ert-remote-temporary-file-directory'. Skip if needed.
(eglot--tramp-test, eglot--tramp-test-2): Don't skip.
| -rw-r--r-- | test/lisp/progmodes/eglot-tests.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el index 518f8810bdf..725b877fd3c 100644 --- a/test/lisp/progmodes/eglot-tests.el +++ b/test/lisp/progmodes/eglot-tests.el | |||
| @@ -1237,8 +1237,6 @@ GUESSED-MAJOR-MODES-SYM are bound to the useful return values of | |||
| 1237 | 1237 | ||
| 1238 | (defvar tramp-histfile-override) | 1238 | (defvar tramp-histfile-override) |
| 1239 | (defun eglot--call-with-tramp-test (fn) | 1239 | (defun eglot--call-with-tramp-test (fn) |
| 1240 | (unless (>= emacs-major-version 27) | ||
| 1241 | (ert-skip "Eglot Tramp support only on Emacs >= 27")) | ||
| 1242 | ;; Set up a Tramp method that’s just a shell so the remote host is | 1240 | ;; Set up a Tramp method that’s just a shell so the remote host is |
| 1243 | ;; really just the local host. | 1241 | ;; really just the local host. |
| 1244 | (let* ((tramp-remote-path (cons 'tramp-own-remote-path | 1242 | (let* ((tramp-remote-path (cons 'tramp-own-remote-path |
| @@ -1260,6 +1258,9 @@ GUESSED-MAJOR-MODES-SYM are bound to the useful return values of | |||
| 1260 | (when (and noninteractive (not (file-directory-p "~/"))) | 1258 | (when (and noninteractive (not (file-directory-p "~/"))) |
| 1261 | (setenv "HOME" temporary-file-directory))))) | 1259 | (setenv "HOME" temporary-file-directory))))) |
| 1262 | (default-directory temporary-file-directory)) | 1260 | (default-directory temporary-file-directory)) |
| 1261 | ;; We must check the remote LSP server. So far, just "clangd" is used. | ||
| 1262 | (unless (ignore-errors (executable-find "clangd" 'remote)) | ||
| 1263 | (ert-skip "Remote clangd not found")) | ||
| 1263 | (funcall fn))) | 1264 | (funcall fn))) |
| 1264 | 1265 | ||
| 1265 | (ert-deftest eglot-test-tramp-test () | 1266 | (ert-deftest eglot-test-tramp-test () |