emacs-devel
[Top][All Lists]
Advanced

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

Re: regression in key handling


From: Lennart Borgman (gmail)
Subject: Re: regression in key handling
Date: Thu, 22 Nov 2007 22:44:15 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Paul Pogonyshev wrote:
Richard Stallman wrote:
    I really think Emacs would benifit from some automated system
    of regression testing, like unit tests or sth. like that.

It isn't trivial do that for keyboard input.
Would you like to work on that?

I'm not following Emacs development closely, but I noticed some
discussion about automated test framework recently.  Didn't see
what it came too, though.

But given that such a framework is in place, I could write
something like this test:

    ;; Test that S-backspace deletes exactly one char.
    (with-temp-buffer
      (insert "XY")
      ; Dispatch S-backspace key somehow...
      (assert (= (buffer-size) 1)))

The problem is I don't know how to emulate a key press.  Ideally,
it should work exactly the same way as if user pressed the key.

So, we'd need 1) a testing framework (I assume someone wrote
something already, given the discussion) and 2) a way to emulate
key presses.  Is there a way to do point 2) in Emacs already?


You can use uread-command-events to simulate events, see for example isearch-unread.




reply via email to

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