From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: regression in key handling Date: Thu, 22 Nov 2007 23:29:23 +0200 Message-ID: <200711222329.23935.pogonyshev@gmx.net> References: <200711202242.03838.pogonyshev@gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195767418 8874 80.91.229.12 (22 Nov 2007 21:36:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Nov 2007 21:36:58 +0000 (UTC) To: emacs-devel@gnu.org, rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 22 22:37:05 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IvJjL-0003t6-TG for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2007 22:37:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvJj7-0007dG-7d for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2007 16:36:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IvJj2-0007ZN-FO for emacs-devel@gnu.org; Thu, 22 Nov 2007 16:36:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IvJiz-0007Sp-ND for emacs-devel@gnu.org; Thu, 22 Nov 2007 16:36:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvJiz-0007SY-EF for emacs-devel@gnu.org; Thu, 22 Nov 2007 16:36:41 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IvJix-0000Et-VV for emacs-devel@gnu.org; Thu, 22 Nov 2007 16:36:40 -0500 Original-Received: (qmail invoked by alias); 22 Nov 2007 21:36:37 -0000 Original-Received: from unknown (EHLO [82.209.226.112]) [82.209.226.112] by mail.gmx.net (mp058) with SMTP; 22 Nov 2007 22:36:37 +0100 X-Authenticated: #16844820 X-Provags-ID: V01U2FsdGVkX1++w64PSIm+Oxx5de0gayG4OSwv0aN2APNIggodb4 MAq1SRpiLvmUSj User-Agent: KMail/1.7.2 In-Reply-To: Content-Disposition: inline X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83896 Archived-At: 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