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

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

bug#27559: 26.0.50; [PATCH] Add tests for cl-macs.el


From: Alex
Subject: bug#27559: 26.0.50; [PATCH] Add tests for cl-macs.el
Date: Mon, 03 Jul 2017 14:23:39 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Tino Calancha <tino.calancha@gmail.com> writes:

> Alex <agrambot@gmail.com> writes:
>
>> This initial version just includes tests for cl-loop, many of which were
>> adapted from Common Lisp the Language 2nd Edition. They are mostly
>> ordered by their appearance in the Hyperspec.
>>
>> When I was just about finished I realized that I could have just used an
>> ert wrapper macro to avoid all of the (eval (quote ...))) business,
>> which would have the added bonus of easily evaluating most of the tests
>> lexically. Should I redo it in this way?
>
> Thanks!  It's very good having all those tests.
> I think we can avoid many of the (eval (quote ...)).
> In the following patch, i keep just those (eval (quote ...)
> where the expansion of `cl-loop' throws an error:

That's more or less what I did at first, but I figured since cl-loop is
a large macro, that it's best to quote the macro so that an accidental
error doesn't halt testing. I actually asked about this in
emacs-devel[1] a couple weeks ago, but no one responded.

For instance, some for-as-arith tests that aren't marked as should-error
currently error in master. As an example, (cl-loop for i above 0 by 2
downfrom 10 collect i) should work, but it errors. I have a working
patch for these, but I wanted to make the tests first.

It would be nice if the ert tests in general could just continue on with
testing even if there are macro-expansion errors.

Footnotes: 
[1]  https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00461.html






reply via email to

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