From: Eli Zaretskii <eliz@gnu.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Improving documentation for ert.el.
Date: Thu, 15 Aug 2024 11:32:36 +0300 [thread overview]
Message-ID: <86plqa6va3.fsf@gnu.org> (raw)
In-Reply-To: <E1scy2G-0005c4-Cv@fencepost.gnu.org> (message from Richard Stallman on Sat, 10 Aug 2024 22:10:20 -0400)
> From: Richard Stallman <rms@gnu.org>
> Date: Sat, 10 Aug 2024 22:10:20 -0400
>
> I started to write tests for `cond*', and found that the documentation
> in ert.el was unjelpful about how to run the test I had written.
ERT has its own manual, ert.info. I suggest to read it when the doc
strings are insufficient, and definitely before you fall back on
reading the comments in ert.el -- that is NOT the primary source of
the documentation for users of ert.el.
> I read the comment at the beginning, which told me about
> `ert-run-tests-interactively'. But what argument should I use? The
> doc string of `ert-run-tests-interactively' referred me to
> `ert-select-tests'.
The ERT manual describes this command in "Running Tests
Interactively", and has a cross-reference to "Test Selectors" where
the argument is described. But for most purposes, just accepting the
default argument of 't' (which means to run all tests) is what you
usually want.
> The doc string of `ert-select-tests' is abstract, and may be helpful
> for understanding how its code works, but it is no help for a user
> trying to see how to call `ert-run-tests-interactively' for any
> specific case.
The node "Test Selectors" in the ERT manual is more helpful, I think.
> I that the name defined with `ert-deftest' would have something to do
> with a name to specify, but was it the symbol itself or its value or
> somehing else? Since the comments did not say, I tried them but
> confusion got in the way. Eventually, after I started writing this, I
> tried again and that that name did work right when passed to
> `ert-run-tests-interactively'.
>
> I think the documentation should say this very explicitly, at the top
> of the file, and in `ert-run-tests-interactively', and also in
> `ert-select-tests'. This will be small compared with the size of
> ert.el.
I clarified some of the related doc strings and the ERT manual on the
emacs-30 branch.
prev parent reply other threads:[~2024-08-15 8:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-11 2:10 Improving documentation for ert.el Richard Stallman
2024-08-15 8:32 ` Eli Zaretskii [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86plqa6va3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).