emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 0d5036061b5: Skip Eglot test if using very old clangd


From: João Távora
Subject: Re: master 0d5036061b5: Skip Eglot test if using very old clangd
Date: Wed, 22 Mar 2023 10:49:41 +0000

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]