Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: "Adam Sjøgren" <asjo@koldfront.dk>
Cc: ding@gnus.org
Subject: Re: is it possible to search by list-id?
Date: Sun, 11 Jul 2021 08:33:33 -0700	[thread overview]
Message-ID: <87r1g4zwz6.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87h7h1tjm2.fsf@tullinup.koldfront.dk> ("Adam =?utf-8?Q?Sj?= =?utf-8?Q?=C3=B8gren=22's?= message of "Sun, 11 Jul 2021 09:06:29 +0200")

Adam Sjøgren <asjo@koldfront.dk> writes:

> Eric writes:
>
>> I've patched this now, and added new tests to prevent regression.
>                              ↑
> This is great! Are tests easy to write for Gnus?

They most certainly aren't! Almost all the crucial code that you'd want
to test requires a full working Gnus installation, with a .newsrc.eld
and local data. There's very little code isolation between the various
bits, and any subsystem you try to test ends up calling all the other
subsystems.

gnus-search is meant to be more modular, but even here you can really
only test query parsing, and the transformation of parsed queries into
search-engine-specific strings. If you want to test the parsing of
search results, you again need a working installation, and external
programs.

I wrote a separate package called gnus-mock to address this: it sets up
a temporary working Gnus installation, and starts a new Emacs process
that you can use to play with Gnus code and wreck the data, and then
delete it all and start afresh. That's what I use for most Gnus hacking.

I also started writing an interactive test suite for this package, so
you could start it up and run the tests, and it would simulate user
behavior, but my courage failed me before I got very far. Maybe someday
when I'm in bed for a week recovering from a broken leg or pneumonia
I'll finish it.

Eric


  reply	other threads:[~2021-07-11 15:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  1:28 Jose A. Ortega Ruiz
2021-07-08 13:15 ` Eric S Fraga
2021-07-08 14:21   ` Jose A. Ortega Ruiz
2021-07-08 17:59     ` Jose A. Ortega Ruiz
2021-07-10  1:21       ` Jose A. Ortega Ruiz
2021-07-11  3:21         ` Eric Abrahamsen
2021-07-11  7:06           ` Adam Sjøgren
2021-07-11 15:33             ` Eric Abrahamsen [this message]
2021-07-11 16:28               ` Adam Sjøgren
2021-07-11 16:42                 ` Eric Abrahamsen
2021-07-11 15:34           ` Jose A. Ortega Ruiz
2021-07-11 16:35             ` Eric Abrahamsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1g4zwz6.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=asjo@koldfront.dk \
    --cc=ding@gnus.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.
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 NNTP newsgroup(s).