GNU bug report logs -
#47320
Improve failure reporting in test/lisp/electrict-tests.el
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Mon, 22 Mar 2021 14:25:02 UTC
Severity: minor
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #28 received at 47320-done <at> debbugs.gnu.org (full text, mbox):
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 <at> 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).
This bug report was last modified 4 years and 113 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.