From: "João Távora" <joaotavora@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 0d5036061b5: Skip Eglot test if using very old clangd
Date: Wed, 22 Mar 2023 10:49:41 +0000 [thread overview]
Message-ID: <CALDnm53Cwwkp9fqi7Z03Yo1OkcSBPGtHgaMcbcnAjqAgc4CnUA@mail.gmail.com> (raw)
In-Reply-To: <87lejpnk9t.fsf@gmail.com>
On Wed, Mar 22, 2023 at 10:38 AM Robert Pluim <rpluim@gmail.com> wrote:
> 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"))))
Sure, thanks. Bonus points for getting rid of the split-string
and using a regexp that looks at the whole string and
catches the version. I tried and failed.
João
next prev parent reply other threads:[~2023-03-22 10:49 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 ` master 0d5036061b5: Skip Eglot test if using very old clangd Robert Pluim
2023-03-22 10:49 ` João Távora [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALDnm53Cwwkp9fqi7Z03Yo1OkcSBPGtHgaMcbcnAjqAgc4CnUA@mail.gmail.com \
--to=joaotavora@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=rpluim@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.