summaryrefslogtreecommitdiff
path: root/test/lisp
diff options
context:
space:
mode:
authorRobert Pluim <rpluim@gmail.com>2022-01-13 10:57:56 +0100
committerRobert Pluim <rpluim@gmail.com>2022-01-14 10:06:21 +0100
commit8df6f002237a1f5624a34c1880aed809918aebe4 (patch)
tree94a84fd8113e9d3548cc47c63efd766dd3a7667c /test/lisp
parent373618d3a8ea378710989032c575b3e0c80381b2 (diff)
downloademacs-8df6f002237a1f5624a34c1880aed809918aebe4.tar.gz
emacs-8df6f002237a1f5624a34c1880aed809918aebe4.tar.bz2
emacs-8df6f002237a1f5624a34c1880aed809918aebe4.zip
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.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/so-long-tests/spelling-tests.el11
1 files 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.