]> code.delx.au - gnu-emacs/blob - test/README
Add new function map-do
[gnu-emacs] / test / README
1 Copyright (C) 2008-2016 Free Software Foundation, Inc.
2 See the end of the file for license conditions.
3
4 This directory contains files intended to test various aspects of
5 Emacs's functionality. Please help add tests!
6
7 Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info
8 "(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
9 for more information on writing and running tests.
10
11 The Makefile in this directory supports the following targets:
12
13 * make check
14 Run all tests as defined in the directory. Expensive tests are
15 suppressed. The result of the tests for <filename>.el is stored in
16 <filename>.log.
17
18 * make check-maybe
19 Like "make check", but run only the tests for files which have
20 unresolved prerequisites.
21
22 * make check-expensive
23 Like "make check", but run also the tests marked as expensive.
24
25 * make <filename> or make <filename>.log
26 Run all tests declared in <filename>.el. This includes expensive
27 tests. In the former case the output is shown on the terminal, in
28 the latter case the output is written to <filename>.log.
29
30 ERT offers selectors, which make it possible to filter out which test
31 cases shall run. The make variable $(SELECTOR) gives you a simple
32 mean to use your own selectors. The ERT manual describes how
33 selectors are constructed, see (info "(ert)Test Selectors") or
34 https://www.gnu.org/software/emacs/manual/html_node/ert/Test-Selectors.html
35
36 You could use predefined selectors of the Makefile. "make <filename>
37 SELECTOR='$(SELECTOR_DEFAULT)'" runs all tests for <filename>.el
38 except the tests tagged as expensive.
39
40 If your test file contains the tests "test-foo", "test2-foo" and
41 "test-foo-remote", and you want to run only the former two tests, you
42 could use a selector regexp: "make <filename> SELECTOR='\"foo$$\"'".
43
44 \f
45 (Also, see etc/compilation.txt for compilation mode font lock tests.)
46
47 \f
48 This file is part of GNU Emacs.
49
50 GNU Emacs is free software: you can redistribute it and/or modify
51 it under the terms of the GNU General Public License as published by
52 the Free Software Foundation, either version 3 of the License, or
53 (at your option) any later version.
54
55 GNU Emacs is distributed in the hope that it will be useful,
56 but WITHOUT ANY WARRANTY; without even the implied warranty of
57 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 GNU General Public License for more details.
59
60 You should have received a copy of the GNU General Public License
61 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.