[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Perl and Emacs: Developing tests for progmodes
From: |
Harald Jörg |
Subject: |
Perl and Emacs: Developing tests for progmodes |
Date: |
Thu, 3 Sep 2020 15:42:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
Hi emacs-devel,
Emacs comes with two modes to edit Perl sources: the rather
lightweight perl-mode, and the not-so-lightweight cperl-mode. Two
weeks ago I wrote a first ERT test for a bug fix in cperl-mode in
test/lisp/progmodes/cperl-mode-tests.el.
This test has been rewritten so that it can be applied to both
cperl-mode and perl-mode, which is nice.
However, there are bugs in cperl-mode which perl-mode doesn't have,
mostly because perl-mode doesn't offer the functions which fail in the
first place. So, tests for these bugs need to (require 'cperl-mode),
and they make no sense when testing perl-mode. I expect most of the
upcoming tests to fall into that category.
To solve this, we could:
- Split the tests into two and manually copy over tests where this
makes sense or:
- Split the tests into a "common" set plus two sets for the specific
modes (how would the files be named in that case?) or:
- Keep all tests in one file and tag the individual tests.
Are there any similar cases in the set of Emacs packages, or
conventions how to do it?
--
Cheers,
haj
- Perl and Emacs: Developing tests for progmodes,
Harald Jörg <=