* 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.
(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))))
\f
;;; Unit tests