unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* FEATURE REQUEST: Make etags recognize 'ert-deftest' by default in .el files
@ 2022-07-23 22:25 Robert Weiner
  2022-07-24  5:46 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Weiner @ 2022-07-23 22:25 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 768 bytes --]

ert.el is a standard testing framework in Emacs which uses 'ert-deftest' to
define test functions.  Because it does not begin with 'def', it is not
recognized as a definition by etags and libraries or packages with many
tests will not have these show up for navigation when using default calls
to etags.

I would suggest one of two solutions:

1.  Modify etags to automatically recognize such definitions by default.
(I tried using the --regex option but had little luck with that due to it
not liking an opening paren without a closing one in the regex).

2. Add an alias of 'def-ert-test' and suggest people use that instead so
that it is picked up by etags.  #1 is obviously better given the number of
existing test definitions that exist already.

Cheers,

-- rsw

[-- Attachment #2: Type: text/html, Size: 1705 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: FEATURE REQUEST: Make etags recognize 'ert-deftest' by default in .el files
  2022-07-23 22:25 FEATURE REQUEST: Make etags recognize 'ert-deftest' by default in .el files Robert Weiner
@ 2022-07-24  5:46 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2022-07-24  5:46 UTC (permalink / raw)
  To: rswgnu; +Cc: emacs-devel

> From: Robert Weiner <rsw@gnu.org>
> Date: Sat, 23 Jul 2022 18:25:16 -0400
> 
> ert.el is a standard testing framework in Emacs which uses 'ert-deftest' to define test functions.  Because it
> does not begin with 'def', it is not recognized as a definition by etags and libraries or packages with many
> tests will not have these show up for navigation when using default calls to etags.
> 
> I would suggest one of two solutions:
> 
> 1.  Modify etags to automatically recognize such definitions by default.  (I tried using the --regex option but
> had little luck with that due to it not liking an opening paren without a closing one in the regex).
> 
> 2. Add an alias of 'def-ert-test' and suggest people use that instead so that it is picked up by etags.  #1 is
> obviously better given the number of existing test definitions that exist already.

Please show what you tried with --regex, I think this is the easiest
solution (we already do something similar to recognize DEFVAR_* in C
sources, see src/Makefile.in).

Thanks.

P.S. Feature requests are best submitted as bug reports, so that our
issue tracker records the discussion and gives it an ID for future
references.  Would you please convert this to such a bug report?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-24  5:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-23 22:25 FEATURE REQUEST: Make etags recognize 'ert-deftest' by default in .el files Robert Weiner
2022-07-24  5:46 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).