[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8df6f00223 1/2: spelling-tests.el: ignore errors when checking fo
From: |
Robert Pluim |
Subject: |
master 8df6f00223 1/2: spelling-tests.el: ignore errors when checking for ispell |
Date: |
Fri, 14 Jan 2022 04:06:34 -0500 (EST) |
branch: master
commit 8df6f002237a1f5624a34c1880aed809918aebe4
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>
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 09ffa3c800..3484957e96 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.