[Top][All Lists]

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

Re: Need for a Emacs regression test suite

From: Stephen J. Turnbull
Subject: Re: Need for a Emacs regression test suite
Date: Tue, 11 Sep 2007 05:12:52 +0900

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:address@hidden :-)  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

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.


reply via email to

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