GNU bug report logs - #76674
Install tests for rst.el in emacs.git

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefankangas <at> gmail.com>

Date: Sun, 2 Mar 2025 05:58:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 76674 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to stefan <at> merten-home.de, bug-gnu-emacs <at> gnu.org:
bug#76674; Package emacs. (Sun, 02 Mar 2025 05:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefankangas <at> gmail.com>:
New bug report received and forwarded. Copy sent to stefan <at> merten-home.de, bug-gnu-emacs <at> gnu.org. (Sun, 02 Mar 2025 05:58:03 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Install tests for rst-mode.el in emacs.git
Date: Sat, 1 Mar 2025 21:57:42 -0800
Severity: wishlist

Hi Stefan,

I see that you have many tests for rst-mode.el here:
https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/tools/editors/emacs/tests/

However, we currently have no tests for rst-mode.el running in
emacs.git.  I think it would be good to create a new file
rst-mode-tests.el and to put all or some of your tests there.

WDYT?




Changed bug title to 'Install tests for rst.el in emacs.git' from 'Install tests for rst-mode.el in emacs.git' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 04 Mar 2025 02:31:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76674; Package emacs. (Mon, 17 Mar 2025 21:13:05 GMT) Full text and rfc822 format available.

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

From: Stefan Merten <stefan <at> merten-home.de>
To: debbugs-submit <at> debbugs.gnu.org
Cc: 76674 <at> debbugs.gnu.org
Subject: Re: bug#76674: Install tests for rst-mode.el in emacs.git
Date: Mon, 17 Mar 2025 22:12:42 +0100
Hi Stefan!

2 weeks (15 days) ago Stefan Kangas wrote:
> I see that you have many tests for rst-mode.el here:
> https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/tools/editors/emacs/tests/
> 
> However, we currently have no tests for rst-mode.el running in
> emacs.git.  I think it would be good to create a new file
> rst-mode-tests.el and to put all or some of your tests there.

When I started those tests many years ago I looked for a place to put
them in the Emacs repository. Then I did not found any place for it.

These tests are based on ert and include some extensions for ert which
IMHO are useful on their own. I'd love to share this but still have no
idea where to put them.

Any idea? A single file makes no sense since it is really a big suite.


						Grüße

						Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76674; Package emacs. (Wed, 19 Mar 2025 22:03:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Stefan Merten <stefan <at> merten-home.de>, 76674 <at> debbugs.gnu.org
Subject: Re: bug#76674: Install tests for rst-mode.el in emacs.git
Date: Wed, 19 Mar 2025 15:01:54 -0700
Hi Stefan,

Stefan Merten <stefan <at> merten-home.de> writes:

> 2 weeks (15 days) ago Stefan Kangas wrote:
>> I see that you have many tests for rst-mode.el here:
>> https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/tools/editors/emacs/tests/
>>
>> However, we currently have no tests for rst-mode.el running in
>> emacs.git.  I think it would be good to create a new file
>> rst-mode-tests.el and to put all or some of your tests there.
>
> When I started those tests many years ago I looked for a place to put
> them in the Emacs repository. Then I did not found any place for it.
>
> These tests are based on ert and include some extensions for ert which
> IMHO are useful on their own. I'd love to share this but still have no
> idea where to put them.
>
> Any idea? A single file makes no sense since it is really a big suite.

We don't have anything established for this case, I think, so we have to
be a bit creative.

To be honest, I think whatever solution you can come up with that is
reasonably clean is okay.  There is always value in having the tests;
we can refactor later if we think of a better structure.

One idea is to follow the pattern established by ERC, i.e.

    test/lisp/erc/*.el

For rst.el, perhaps we could use something like

    test/lisp/textmodes/rst/*.el

That said, I didn't check if files structured like that would get picked
up automatically by the Makefile.  If it doesn't and it's too tedious to
add, one workaround could be to add a top-level file

    test/lisp/textmodes/rst-tests.el

that would then load the appropriate test files in the subdirectory.
Again, we can restructure later.  Installing the tests is the important
part, IMO.

For test data, see `ert-resource-file` and `ert-resource-directory`.

Finally, also consider using :expensive where appropriate.

Thanks for looking into this.




This bug report was last modified 87 days ago.

Previous Next


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