[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regression in key handling
From: |
Paul Pogonyshev |
Subject: |
Re: regression in key handling |
Date: |
Thu, 22 Nov 2007 23:29:23 +0200 |
User-agent: |
KMail/1.7.2 |
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?
Paul