Make eglot--clangd-version more robust
* test/lisp/progmodes/eglot-tests.el (eglot--clangd-version): Check for 'version ' followed by a combination of numbers and dots to extract the clangd version.
This commit is contained in:
parent
2d0de86361
commit
103ebbf92f
1 changed files with 4 additions and 3 deletions
|
@ -316,9 +316,10 @@ then restored."
|
|||
|
||||
(defun eglot--clangd-version ()
|
||||
"Report on the clangd version used in various tests."
|
||||
(replace-regexp-in-string
|
||||
".*version[[:space:]]+\\(.*\\)" "\\1"
|
||||
(car (split-string (shell-command-to-string "clangd --version") "\n"))))
|
||||
(let ((version (shell-command-to-string "clangd --version")))
|
||||
(when (string-match "version[[:space:]]+\\([0-9.]*\\)"
|
||||
version)
|
||||
(match-string 1 version))))
|
||||
|
||||
|
||||
;;; Unit tests
|
||||
|
|
Loading…
Add table
Reference in a new issue