unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: "João Távora" <joaotavora@gmail.com>
Cc: Michael Albinus <michael.albinus@gmx.de>, 47320-done@debbugs.gnu.org
Subject: bug#47320: Improve failure reporting in test/lisp/electrict-tests.el
Date: Wed, 24 Mar 2021 19:42:54 +0000	[thread overview]
Message-ID: <YFuWPo/nh9SEwiBi@ACM> (raw)
In-Reply-To: <CALDnm50+WmH=9J02aVJJHYmzKFTQkX8KEGvd_Y2_p75r4LiMRg@mail.gmail.com>

Hello again, João.

On Wed, Mar 24, 2021 at 14:02:58 +0000, João Távora wrote:
> On Wed, Mar 24, 2021 at 1:46 PM Alan Mackenzie <acm@muc.de> wrote:

> > I'm having some difficulty getting my head around the "explanation"
> > functionality of ert, which leans me towards my initial plan.

> > Here's the patch (actually written quite a long time ago) I would like to
> > merge into electric-tests.el:

> As far as I understand, this just stores the big explanation string in
> a variable, and uses it both for putting into the `ert-deftest` 's docstring
> as well as for logging with message(), right?  If so, it's fine to add.

> Maybe you could leverage `ert-fail` instead of checking the test's
> main assertion twice, once in should, and once when deciding
> whether to log.

In the end, I couldn't get that to work - the handler for the signal, in
outputting the doc string, replaced all the \n's with the octal
read-syntax, "\\12".  This left the text readable only with effort.

> I'd say, just check it once and put both logging and `ert-fail` inside the if.

I just committed the patch as it was.  Sorry.

> João

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2021-03-24 19:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 14:24 bug#47320: Improve failure reporting in test/lisp/electrict-tests.el Alan Mackenzie
2021-03-23  8:53 ` Michael Albinus
2021-03-23 14:47   ` Alan Mackenzie
2021-03-23 15:24     ` Michael Albinus
2021-03-23 15:59       ` João Távora
2021-03-24 13:46         ` Alan Mackenzie
2021-03-24 14:02           ` João Távora
2021-03-24 19:42             ` Alan Mackenzie [this message]
2021-03-24 20:10               ` João Távora
2021-03-25 13:43                 ` Alan Mackenzie
2021-03-25 23:47                   ` João Távora

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=YFuWPo/nh9SEwiBi@ACM \
    --to=acm@muc.de \
    --cc=47320-done@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=michael.albinus@gmx.de \
    /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).