]> git.eshelyaron.com Git - emacs.git/commitdiff
spelling-tests.el: ignore errors when checking for ispell
authorRobert Pluim <rpluim@gmail.com>
Thu, 13 Jan 2022 09:57:56 +0000 (10:57 +0100)
committerRobert Pluim <rpluim@gmail.com>
Fri, 14 Jan 2022 09:06:21 +0000 (10:06 +0100)
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.

test/lisp/so-long-tests/spelling-tests.el

index 09ffa3c8006adc993830951af2bd024b535e32ac..3484957e962db506c2b515659907a1ed43e7e276 100644 (file)
 ;; 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.