bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30745: 26.0.91; ert should macros nest strangely


From: Noam Postavsky
Subject: bug#30745: 26.0.91; ert should macros nest strangely
Date: Tue, 14 Aug 2018 20:47:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

block 30745 by 24618
tags 30745 + patch
quit

phillip.lord@russet.org.uk (Phillip Lord) writes:

> Unfortunately, yes. I didn't try nesting two ert-deftest macros, just
> two should's. As the original bug report suggests it's for testing a
> test library (https://github.com/phillord/assess).
>
> I do have a work around now (which is to unnest the shoulds); and
> fortunately, this work-around is backward compatible which is important
> for me. I still have another test failure in my library,
> though. Probably caused by the same thing but I haven't worked on it
> yet.

I have a patch for ert which removes it's (ab)use of the debugger, it
seems to fix this case (and also Bug#11218).  Note that it relies on my
patch in #24618 for a catch-all condition-case handler clause.

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24618;filename=0001-Allow-t-as-a-catch-all-condition-case-handler-Bug-24.patch;msg=8;att=1

Attachment: v1-0001-Use-signal-hook-function-in-ert-not-debugger.patch
Description: patch

But it bumps into another bug lurking in process.c, which just happened
to work okay previously because ert would bind debug-on-error while
running tests.  There is only one test in the Emacs test suite which
triggers this, we can work around it by binding debug-on-error there:

Attachment: v1-0002-Work-around-should-error-.-accept-process-output-.patch
Description: patch

This third patch is not really needed to fix the bug, but I had to
simplify the code in order to figure out what was going on anyway.

Attachment: v1-0003-Simplify-ert-should-expansion-macro-machinery.patch
Description: patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]