GNU bug report logs -
#24939
[PATCH] Add tests for lisp/kmacro.el
Previous Next
Reported by: Gemini Lasswell <gazally <at> runbox.com>
Date: Sun, 13 Nov 2016 21:25:01 UTC
Severity: wishlist
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 04 Feb 2017 13:57:16 +0200
with message-id <83efze88yr.fsf <at> gnu.org>
and subject line Re: bug#24939: [PATCH] Add tests for lisp/kmacro.el
has caused the debbugs.gnu.org bug report #24939,
regarding [PATCH] Add tests for lisp/kmacro.el
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
24939: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24939
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hello,
There weren't any tests for kmacro.el, so I have written some.
Two things that may yet need to be done:
1. These tests make extensive use of two macros, called
kmacro-tests-should-call and kmacro-tests-should-not-call. They are
context-creating macros which add advice to named functions for the
duration of a test. I think that these two macros would be a useful
addition to ERT, and I'll submit that idea as a separate patch.
2. I found several minor bugs in the process of writing these, leading
to tests marked as :expected-result :failed. One is a way to create an
empty keyboard macro using the mouse and the rest are ways to get
kmacro-step-edit-macro to behave oddly. I haven't sent them to
bug-gnu-emacs yet. When I do so would it be better to send them
individually or put all the step-edit ones in one report?
My copyright assignment paperwork was finished as of Nov 2.
[0001-Add-tests-for-lisp-kmacro.el.patch (text/plain, attachment)]
[Message part 5 (message/rfc822, inline)]
> From: Gemini Lasswell <gazally <at> runbox.com>
> Cc: 24939 <at> debbugs.gnu.org
> Date: Sat, 31 Dec 2016 09:42:25 -0800
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
> > Allow me a few comments to your proposed patch.
>
> Here is an updated version taking your comments into account. I was able
> to remove the use of advice on all the functions in macros.c except for
> end-kbd-macro, because I couldn't come up with another way to make
> kmacro-end-macro recognize a keyboard macro defined by a test.
> kmacro-end-macro tests last-kbd-macro right after it calls
> end-kbd-macro, and end-kbd-macro is going to leave last-kbd-macro empty
> unless it has something in current_kboard->kbd_macro_buffer, which Lisp
> can't access. If there is another strategy you'd like me to try there,
> let me know.
Thanks, I pushed this now.
> This patch contains kmacro-tests-with-message-capture which is the same
> as the macro proposed as an addition to ert-x.el in bug#25158, so if
> that patch is adopted, it could be removed from this patch.
I've replaced the macro with ert-with-message-capture.
This bug report was last modified 8 years and 200 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.