[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 6370a1c 10/49: Fix some of eglot-tests.el for new
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eglot 6370a1c 10/49: Fix some of eglot-tests.el for new Eldoc library |
Date: |
Wed, 17 Mar 2021 18:41:43 -0400 (EDT) |
branch: externals/eglot
commit 6370a1cb79bdaab1d6788cd1fcd23359930092e0
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Fix some of eglot-tests.el for new Eldoc library
* eglot-tests.el (eglot--tests-force-full-eldoc): Rewrite for new
Eldoc.
(eglot-multiline-eldoc): Unbreak.
---
eglot-tests.el | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/eglot-tests.el b/eglot-tests.el
index c6d7ee2..e297314 100644
--- a/eglot-tests.el
+++ b/eglot-tests.el
@@ -425,19 +425,21 @@ Pass TIMEOUT to `eglot--with-timeout'."
(eldoc t))
(defun eglot--tests-force-full-eldoc ()
- (let ((origin (current-buffer)))
- (with-current-buffer (eldoc-doc-buffer)
+ ;; FIXME: This uses some Eldoc implementation defatils.
+ (when (buffer-live-p eldoc--doc-buffer)
+ (with-current-buffer eldoc--doc-buffer
(let ((inhibit-read-only t))
- (erase-buffer)
- (with-current-buffer origin
- (eglot--eldoc-on-demand))
- (cl-loop
- repeat 10
- while (zerop (length (buffer-string)))
- do (sit-for 0.1))
- (should (cl-plusp (length (buffer-string))))
- (message "returning %s" (buffer-string))
- (buffer-string)))))
+ (erase-buffer))))
+ (eglot--eldoc-on-demand)
+ (cl-loop
+ repeat 10
+ for retval = (and (buffer-live-p eldoc--doc-buffer)
+ (with-current-buffer eldoc--doc-buffer
+ (let ((bs (buffer-string)))
+ (unless (zerop (length bs)) bs))))
+ when retval return retval
+ do (sit-for 0.1)
+ finally (error "eglot--tests-force-full-eldoc didn't deliver.")))
(ert-deftest rls-hover-after-edit ()
"Hover and highlightChanges are tricky in RLS."
@@ -588,7 +590,7 @@ def foobazquuz(d, e, f): pass
(let* ((eldoc-echo-area-use-multiline-p t)
(captured-message (eglot--tests-force-full-eldoc)))
(should (string-match "datetim" captured-message))
- (should (cl-find ?\n eldoc-last-message))))))
+ (should (cl-find ?\n captured-message))))))
(ert-deftest eglot-single-line-eldoc ()
"Test if suitable amount of lines of hover info are shown."
- [elpa] externals/eglot updated (4edd478 -> 97ed4ca), Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 926d0594 01/49: Close #575: Use flex completion if available by default, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 4c85df2 02/49: Close #212: Don't block in eglot-imenu if performing non-essential task, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 16bbf85 03/49: Fix #582: flex completion style is not available on Emacs < 27, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot ceac05c 05/49: Fix #593: Unbreak interactivee eglot--connect for complex contact specs, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 83cd785 12/49: Fix #365: Fix eglot-completion-at-point for multiple matches, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 9da9d69 04/49: C-u M-x eglot discards class guessed by eglot--guess-contact, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 51f1320 09/49: Skip downloading GNU ELPA deps on make check by default, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 6370a1c 10/49: Fix some of eglot-tests.el for new Eldoc library,
Stefan Monnier <=
- [elpa] externals/eglot 8761f86 11/49: Unbreak eglot-dcase test, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 0c4daa4 13/49: Fix #531: mention M-x eldoc as preferred documentation command, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot e5a9648 07/49: Fix #513: use `path-separator', not ":", in Eclipse/JDT custom code, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot e6ca70c 14/49: Close #599: add rnix-lsp server for nix-mode, community suggestion, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 1f2b024 23/49: Close #605: Support activeParameter property for SignatureInformation, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 2fc0db8 33/49: Fix #467: make eglot-ignored-server-capabilites defcustom a set, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 1a54fc0 40/49: Per #627: URIfy better, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 7f2e680 38/49: Fix #627: handle empty actions array in window/showMessageRequest, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot d00dfe3 08/49: Fix #592: run exit-function only for finished completion, Stefan Monnier, 2021/03/17
- [elpa] externals/eglot 8305eed 18/49: * eglot.el (eglot): Tweak docstring grammar., Stefan Monnier, 2021/03/17