spelling-tests.el: ignore errors when checking for ispell

ispell-valid-dictionary-list can signal an error, eg when the local
hunspell installation cannot find any dictionaries, so it's best to
ignore that error.

* test/lisp/so-long-tests/spelling-tests.el (so-long-spelling): Wrap
ispell check in ignore-errors, as ispell-valid-dictionary-list can
signal an error.
This commit is contained in:
Robert Pluim 2022-01-13 10:57:56 +01:00
parent 373618d3a8
commit 8df6f00223

View file

@ -36,12 +36,11 @@
;; make lisp/so-long-tests/spelling-tests SELECTOR=t
;; Only define the test if spell-checking is possible.
(when (and ispell-program-name
(executable-find ispell-program-name)
(condition-case ()
(progn (ispell-check-version) t)
(error nil))
(member "british" (ispell-valid-dictionary-list)))
(when (ignore-errors
(and ispell-program-name
(executable-find ispell-program-name)
(progn (ispell-check-version) t)
(member "british" (ispell-valid-dictionary-list))))
(ert-deftest so-long-spelling ()
"Check the spelling in the source code."
:tags '(:unstable) ;; It works for me, but I'm not sure about others.