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?