From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Need for a Emacs regression test suite Date: Tue, 11 Sep 2007 05:12:52 +0900 Message-ID: <87tzq25lff.fsf@uwakimon.sk.tsukuba.ac.jp> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189459671 11147 80.91.229.12 (10 Sep 2007 21:27:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2007 21:27:51 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: dhruva Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 11 07:27:37 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 1IUx74-0005tY-3S for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2007 06:12:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUpch-0000KV-Fv for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2007 16:12:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IUpce-0000KQ-Gg for emacs-devel@gnu.org; Mon, 10 Sep 2007 16:12:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IUpcc-0000K8-H8 for emacs-devel@gnu.org; Mon, 10 Sep 2007 16:12:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUpcc-0000K2-Ed for emacs-devel@gnu.org; Mon, 10 Sep 2007 16:12:38 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IUpcW-00019j-Qp; Mon, 10 Sep 2007 16:12:33 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (unknown [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 23ED77FFD; Tue, 11 Sep 2007 05:12:29 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id A07DB1A2E11; Tue, 11 Sep 2007 05:12:52 +0900 (JST) In-Reply-To: X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" (+CVS-20070621) XEmacs Lucid X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:78505 Archived-At: dhruva writes: > I request Stephen to provide me some links that can help me understand > and get it up and running for Emacs. Hope it is hackable with average > Elisp knowledge. Basically, just get a copy of the XEmacs sources and the test suite is self-contained, in the tests/automated directory. The testing framework itself is in the file test-harness.el. The tests, which are more or less organized according to subsystem, are in files named MODULE-tests.el. (These files are never byte-compiled to .elcs; instead, the tests are run both uncompiled and compiled, with compilation being done on the fly.) The only link I can give off hand is mailto:stephen@xemacs.org. :-) I will certainly contribute to any work on the test suite to make it work with Emacs, because that is an excellent way to identify, and with luck in many cases eliminate, gratuitous differences between the two. There may be some information in the Internals manual, but in fact writing most tests is "mere scripting". We have some macros such as Assert to actually run a test and check for correct values, CheckError to run a test of invalid code and check that it raises the correct error condition, and so on. If you can write recipe to identify a bug, then you just wrap it in one of those macros. Eg, to test addition you could do (Assert (= (+ 1 1) 2)) and you're done.