GNU bug report logs - #79177
31.0.50; [PATCH] [v4] Add tests to ispell.el

Previous Next

Package: emacs;

Reported by: Lockywolf <for_emacs_1 <at> lockywolf.net>

Date: Tue, 5 Aug 2025 14:10:03 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Full log


Message #44 received at 79177 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lockywolf <for_emacs_1 <at> lockywolf.net>
Cc: 79177 <at> debbugs.gnu.org
Subject: Re: bug#79177: 31.0.50; [PATCH] [v4] Add tests to ispell.el
Date: Sat, 09 Aug 2025 19:08:18 +0300
> From: Lockywolf <for_emacs_1 <at> lockywolf.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  79177 <at> debbugs.gnu.org
> Date: Sat, 09 Aug 2025 23:31:29 +0800
> 
> Lockywolf <for_emacs_1 <at> lockywolf.net> writes:
> 
> > [[PGP Signed Part:Good signature from FBD6C1B20FEC6DAA Lockywolf (Provisional) <*@lockywolf.net> (trust ultimate) created at 2025-08-09T23:29:34+0800 using EDDSA]]
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> >
> >> If there's no way of using some program that we are sure will be
> >> installed, please use skip-unless to skip the test when Bash is not
> >> available.
> >
> > Done.
> >
> >> Look, when I see "/foo/bar" file names in Emacs sources, it
> >> immediately draws my attention, because such file names cause
> >> portability problems.  So, unless using expand-file-name and/or
> >> temporary-file-directory here is somehow problematic and causes
> >> trouble, please do use them, so that this doesn't stand out, okay?
> >>
> >
> > I have tried to make the best of the discussion.
> > The test is there, and it should reliably fail on both GNU and Windows.

Thanks.  I've now run the tests on my system, and I have a couple of
minor comments.

First, the names of the test files don't follow our conventions.  They
should be ispell-aspell-tests.el and ispell-ispell-tests.el or just
ispell-tests.el.  IOW, the names must end in "-tests.el".

> +(ert-deftest ispell/ispell-init-process/works-nohome ()
> +  "Simple test to check that ispell-init-process works."
> +  :expected-result :failed
> +  (skip-unless (ispell-tests--some-backend-available-p))
> +  (letopt ((ispell-program-name (ispell-tests--some-backend)))
> +          (with-temp-buffer
> +            (ispell-init-process))))

This test unexpectedly passed on my system.  Can you explain why you
expected it to fail?

> +(ert-deftest ispell/ispell-accept-buffer-local-defs/simple ()
> +  "Check that `ispell-accept-buffer-local-defs' works for a
> +batch mode.
> +1. local words
> +2. dictionary and pdict
> +3. parser and extcharmode"
> +  (with-environment-variables (("HOME" temporary-file-directory))
> +    (with-temp-buffer
> +      (let ((test-dictname "english")
> +            (test-extcharmode "~latin3")
> +            (test-parser "~testparser")
> +            (test-localword1 "aaaaaaaaaaaaa")
> +            (test-localword2 "bbbbbbbbbbb")
> +            (test-pdict "test-pdict.pdict"))

This test is Ispell-specific, it will not work if the spell-checker
is, say, Hunspell.  For example, Hunspell's English dictionary is
"en_US", not "English".  So you should skip it if the backend is not
literally Ispell.




This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.