From 8df6f002237a1f5624a34c1880aed809918aebe4 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 13 Jan 2022 10:57:56 +0100 Subject: [PATCH] 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. --- test/lisp/so-long-tests/spelling-tests.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/lisp/so-long-tests/spelling-tests.el b/test/lisp/so-long-tests/spelling-tests.el index 09ffa3c8006..3484957e962 100644 --- a/test/lisp/so-long-tests/spelling-tests.el +++ b/test/lisp/so-long-tests/spelling-tests.el @@ -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. -- 2.39.2