From: Robert Pluim <rpluim@gmail.com>
To: emacs-devel@gnu.org
Cc: "João Távora" <joaotavora@gmail.com>
Subject: Re: master 0d5036061b5: Skip Eglot test if using very old clangd
Date: Wed, 22 Mar 2023 11:38:22 +0100 [thread overview]
Message-ID: <87lejpnk9t.fsf@gmail.com> (raw)
In-Reply-To: <20230321184332.93736C13913@vcs2.savannah.gnu.org> ("João Távora"'s message of "Tue, 21 Mar 2023 14:43:32 -0400 (EDT)")
>>>>> On Tue, 21 Mar 2023 14:43:32 -0400 (EDT), João Távora <joaotavora@gmail.com> said:
João> branch: master
João> commit 0d5036061b544f5a306ccd275502f608ec9d3f25
João> Author: João Távora <joaotavora@gmail.com>
João> Commit: João Távora <joaotavora@gmail.com>
João> Skip Eglot test if using very old clangd
João> * test/lisp/progmodes/eglot-tests.el (eglot--clangd-version): New
João> helper.
João> (eglot-test-diagnostic-tags-unnecessary-code): Use it.
João> ---
João> test/lisp/progmodes/eglot-tests.el | 7 +++++++
João> 1 file changed, 7 insertions(+)
João> diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el
João> index 7ac26732737..c4b23bfd64e 100644
João> --- a/test/lisp/progmodes/eglot-tests.el
João> +++ b/test/lisp/progmodes/eglot-tests.el
João> @@ -314,6 +314,12 @@ then restored."
João> (setq last-command-event char)
João> (call-interactively (key-binding (vector char))))
João> +(defun eglot--clangd-version ()
João> + "Report on the clangd version used in various tests."
João> + (replace-regexp-in-string
João> + ".*version[[:space:]]+\\(.*\\)" "\\1"
João> + (car (split-string (shell-command-to-string "clangd --version") "\n"))))
Not all clangd have the version string and only the version string at
the end of 'clangd --version'. Hereʼs one I installed from git earlier:
clangd version 16.0.0 (https://github.com/llvm/llvm-project.git 08d094a0e457360ad8b94b017d2dc277e697ca76)
Features: linux
Platform: x86_64-unknown-linux-gnu
So how about the following (or we could just say 'everything
non-space', but Iʼm assuming clangd versions are always made up of
numbers and '.')
diff --git c/test/lisp/progmodes/eglot-tests.el i/test/lisp/progmodes/eglot-tests.el
index c4b23bfd64e..557bd899ab7 100644
--- c/test/lisp/progmodes/eglot-tests.el
+++ i/test/lisp/progmodes/eglot-tests.el
@@ -317,7 +317,7 @@ eglot--simulate-key-event
(defun eglot--clangd-version ()
"Report on the clangd version used in various tests."
(replace-regexp-in-string
- ".*version[[:space:]]+\\(.*\\)" "\\1"
+ ".*version[[:space:]]+\\([0-9.]*\\).*" "\\1"
(car (split-string (shell-command-to-string "clangd --version") "\n"))))
\f
Robert
--
next parent reply other threads:[~2023-03-22 10:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <167942421231.13373.16122455155218245677@vcs2.savannah.gnu.org>
[not found] ` <20230321184332.93736C13913@vcs2.savannah.gnu.org>
2023-03-22 10:38 ` Robert Pluim [this message]
2023-03-22 10:49 ` master 0d5036061b5: Skip Eglot test if using very old clangd João Távora
2023-03-22 11:12 ` Robert Pluim
2023-03-22 11:14 ` João Távora
2023-03-22 11:51 ` Robert Pluim
2023-03-22 18:24 ` João Távora
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lejpnk9t.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=joaotavora@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).