aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorPaul Eggert2017-11-02 21:01:44 -0700
committerPaul Eggert2017-11-02 21:01:44 -0700
commit1441eb76fd08572c25e0128c247cc1a628a79ff2 (patch)
treeaaa9a86485836a33618d258a55d8cdbe6082c91a /doc/misc
parent3ca4a3c8d40ea89ed717e0673fa85f5c1ac851ed (diff)
parent460fe4a1bc40f2ba39deda6448a7baf57e0e6b76 (diff)
downloademacs-1441eb76fd08572c25e0128c247cc1a628a79ff2.tar.gz
emacs-1441eb76fd08572c25e0128c247cc1a628a79ff2.zip
Merge from origin/emacs-26
460fe4a1bc ; Doc fixes 41adf3281e Avoid duplicate calls to xfree for the same pointer 3e7ebbe1bd Don't clobber docstrings of explicitly-defined mode hook v... 9c8fe0248b Avoid fullscreen ediff control frames by default (Bug#29026) 7d32176acc Fix the bug#24034 change (revno 9eb028f) causing infloop (... ee493663ba Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/e... ca5eb0d0b7 Fix a typo in the ELisp manual d10c9479ca Fix doc and doc-strings for minibuffer window related func... 18331d00da Fix "Args out of range" error in c-determine-limit. Fixes... edde35e6f8 * lisp/progmodes/perl-mode.el: Fix electric indentation wi... 056587c45f Extend mhtml submode region when in comment 4c4ad80848 Fix mthml submode lighting at end of buffer 557e252aa2 Remember more variables in mhtml-mode 336cd0a11a ; * lisp/select.el (select-enable-primary): Add missing pe... 134099bc90 ; * etc/NEWS (EUDC): Mark as not requiring documentation. 1a340274bf * etc/NEWS (EUDC): Deprecate BBDB 2.x backward compatibility. 4189d0ef7b Fix minibuffer window related docs and strings (Bug#28978) 2ebdde6e9c Add ChkTeX flymake backend for latex-mode 5b59841791 Fix doc typos 82a16c547b Fix some duplicate word typos 266888b1d7 * doc/lispref/commands.texi (Adjusting Point): Fix wording... 00c3c6d88d Avoid segfaults in 64-bit Windows builds a8e6741066 Fix conversion of pixel coordinates to buffer position d43b486f6c Fix doc strings in desktop.el 9102fb603e Add Index to ERT manual 68182a4710 Make manuals and NEWS consistent 451823b0e5 Don't allow (minibuffer-window-active-p nil) to return t cc8f72ca22 Clarify obsolescence message for 'whitespace-tab' 50f711e7fa Fix some duplicate words typos 8bd9524a7c * lisp/button.el (button-activate): Fix doc typo. 0b0d91e60a * lisp/calendar/todo-mode.el (todo-toggle-mark-item): Fix ... e6b4e5ffdf Fix some doc typos e8636ac8cc Fix startup display on Cygwin 3926c5ad83 * src/fileio.c (Fset_default_file_modes): Fix typo in doc ... 9715317dfd * lisp/dired.el (dired-find-alternate-file): Doc fix. (Bu... 9e442a001a Improve documentation of how faces are applied to display ... 1bda71ec3b Improve pixel-scroll-mode 196106d37d Support Certification Authority Authorization in dns-mode.el ec08d70b4f Improve documentation of set-default-file-modes # Conflicts: # etc/NEWS
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/ede.texi2
-rw-r--r--doc/misc/ert.texi113
-rw-r--r--doc/misc/flymake.texi2
-rw-r--r--doc/misc/gnus.texi2
-rw-r--r--doc/misc/sem-user.texi2
-rw-r--r--doc/misc/srecode.texi2
6 files changed, 101 insertions, 22 deletions
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index a79170179bc..4bf0e8dbb2c 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -2555,7 +2555,7 @@ Return non-@code{nil} if @var{THIS} target wants @var{FILE}.
2555@end deffn 2555@end deffn
2556 2556
2557@deffn Method project-add-file :AFTER ot file 2557@deffn Method project-add-file :AFTER ot file
2558Add the current buffer into project project target @var{OT}. 2558Add the current buffer into project target @var{OT}.
2559Argument @var{FILE} is the file to add. 2559Argument @var{FILE} is the file to add.
2560@end deffn 2560@end deffn
2561 2561
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 2a17a211665..de71aca8aea 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -3,6 +3,10 @@
3@setfilename ../../info/ert.info 3@setfilename ../../info/ert.info
4@settitle Emacs Lisp Regression Testing 4@settitle Emacs Lisp Regression Testing
5@include docstyle.texi 5@include docstyle.texi
6@syncodeindex fn cp
7@syncodeindex vr cp
8@syncodeindex pg cp
9@syncodeindex ky cp
6@c %**end of header 10@c %**end of header
7 11
8@dircategory Emacs misc features 12@dircategory Emacs misc features
@@ -59,6 +63,7 @@ traditional software development methods.
59* How to Debug Tests:: What to do if a test fails. 63* How to Debug Tests:: What to do if a test fails.
60* Extending ERT:: ERT is extensible in several ways. 64* Extending ERT:: ERT is extensible in several ways.
61* Other Testing Concepts:: Features not in ERT. 65* Other Testing Concepts:: Features not in ERT.
66* Index:: Concept, Function and Variable Index
62* GNU Free Documentation License:: The license for this documentation. 67* GNU Free Documentation License:: The license for this documentation.
63 68
64@detailmenu 69@detailmenu
@@ -92,6 +97,10 @@ Other Testing Concepts
92* Mocks and Stubs:: Stubbing out code that is irrelevant to the test. 97* Mocks and Stubs:: Stubbing out code that is irrelevant to the test.
93* Fixtures and Test Suites:: How ERT differs from tools for other languages. 98* Fixtures and Test Suites:: How ERT differs from tools for other languages.
94 99
100Index
101
102* Index:: Concept, Function and Variable Index
103
95Appendix 104Appendix
96 105
97* GNU Free Documentation License:: The license for this documentation. 106* GNU Free Documentation License:: The license for this documentation.
@@ -102,6 +111,7 @@ Appendix
102 111
103@node Introduction 112@node Introduction
104@chapter Introduction 113@chapter Introduction
114@cindex introduction to ERT
105 115
106ERT allows you to define @emph{tests} in addition to functions, 116ERT allows you to define @emph{tests} in addition to functions,
107macros, variables, and the other usual Lisp constructs. Tests are 117macros, variables, and the other usual Lisp constructs. Tests are
@@ -169,6 +179,7 @@ Environment}.
169 179
170@node How to Run Tests 180@node How to Run Tests
171@chapter How to Run Tests 181@chapter How to Run Tests
182@cindex how to run ert tests
172 183
173You can run tests either in the Emacs you are working in, or on the 184You can run tests either in the Emacs you are working in, or on the
174command line in a separate Emacs process in batch mode (i.e., with no 185command line in a separate Emacs process in batch mode (i.e., with no
@@ -187,7 +198,10 @@ different Emacs versions.
187 198
188@node Running Tests Interactively 199@node Running Tests Interactively
189@section Running Tests Interactively 200@section Running Tests Interactively
201@cindex running tests interactively
202@cindex interactive testing
190 203
204@findex ert
191You can run the tests that are currently defined in your Emacs with 205You can run the tests that are currently defined in your Emacs with
192the command @kbd{@kbd{M-x} ert @kbd{RET} t @kbd{RET}}. (For an 206the command @kbd{@kbd{M-x} ert @kbd{RET} t @kbd{RET}}. (For an
193explanation of the @code{t} argument, @pxref{Test Selectors}.) ERT will pop 207explanation of the @code{t} argument, @pxref{Test Selectors}.) ERT will pop
@@ -232,6 +246,7 @@ F list-test
232 (different-atoms c d)))) 246 (different-atoms c d))))
233@end example 247@end example
234 248
249@cindex test results buffer
235At the top, there is a summary of the results: we ran all tests defined 250At the top, there is a summary of the results: we ran all tests defined
236in the current Emacs (@code{Selector: t}), 31 of them passed, and 2 251in the current Emacs (@code{Selector: t}), 31 of them passed, and 2
237failed unexpectedly. @xref{Expected Failures}, for an explanation of 252failed unexpectedly. @xref{Expected Failures}, for an explanation of
@@ -245,20 +260,29 @@ unexpected result. In the example above, there are two failures, both
245due to failed @code{should} forms. @xref{Understanding Explanations}, 260due to failed @code{should} forms. @xref{Understanding Explanations},
246for more details. 261for more details.
247 262
263@kindex TAB@r{, in ert results buffer}
264@kindex S-TAB@r{, in ert results buffer}
248In the ERT results buffer, @kbd{TAB} and @kbd{S-TAB} cycle between 265In the ERT results buffer, @kbd{TAB} and @kbd{S-TAB} cycle between
249buttons. Each name of a function or macro in this buffer is a button; 266buttons. Each name of a function or macro in this buffer is a button;
250moving point to it and typing @kbd{RET} jumps to its definition. 267moving point to it and typing @kbd{RET} jumps to its definition.
251 268
269@kindex r@r{, in ert results buffer}
270@kindex d@r{, in ert results buffer}
271@kindex .@r{, in ert results buffer}
272@kindex b@r{, in ert results buffer}
273@cindex backtrace of a failed test
252Pressing @kbd{r} re-runs the test near point on its own. Pressing 274Pressing @kbd{r} re-runs the test near point on its own. Pressing
253@kbd{d} re-runs it with the debugger enabled. @kbd{.} jumps to the 275@kbd{d} re-runs it with the debugger enabled. @kbd{.} jumps to the
254definition of the test near point (@kbd{RET} has the same effect if 276definition of the test near point (@kbd{RET} has the same effect if
255point is on the name of the test). On a failed test, @kbd{b} shows 277point is on the name of the test). On a failed test, @kbd{b} shows
256the backtrace of the failure. 278the backtrace of the failure.
257 279
280@kindex l@r{, in ert results buffer}
258@kbd{l} shows the list of @code{should} forms executed in the test. 281@kbd{l} shows the list of @code{should} forms executed in the test.
259If any messages were generated (with the Lisp function @code{message}) 282If any messages were generated (with the Lisp function @code{message})
260in a test or any of the code that it invoked, @kbd{m} will show them. 283in a test or any of the code that it invoked, @kbd{m} will show them.
261 284
285@kindex L@r{, in ert results buffer}
262By default, long expressions in the failure details are abbreviated 286By default, long expressions in the failure details are abbreviated
263using @code{print-length} and @code{print-level}. Pressing @kbd{L} 287using @code{print-length} and @code{print-level}. Pressing @kbd{L}
264while point is on a test failure will increase the limits to show more 288while point is on a test failure will increase the limits to show more
@@ -267,7 +291,11 @@ of the expression.
267 291
268@node Running Tests in Batch Mode 292@node Running Tests in Batch Mode
269@section Running Tests in Batch Mode 293@section Running Tests in Batch Mode
294@cindex running tests in batch mode
295@cindex batch-mode testing
270 296
297@findex ert-run-tests-batch
298@findex ert-run-tests-batch-and-exit
271ERT supports automated invocations from the command line or from 299ERT supports automated invocations from the command line or from
272scripts or makefiles. There are two functions for this purpose, 300scripts or makefiles. There are two functions for this purpose,
273@code{ert-run-tests-batch} and @code{ert-run-tests-batch-and-exit}. 301@code{ert-run-tests-batch} and @code{ert-run-tests-batch-and-exit}.
@@ -283,6 +311,7 @@ with a zero exit status if all tests passed, or nonzero if any tests
283failed or if anything else went wrong. It will also print progress 311failed or if anything else went wrong. It will also print progress
284messages and error diagnostics to standard output. 312messages and error diagnostics to standard output.
285 313
314@findex ert-summarize-tests-batch-and-exit
286You can also redirect the above output to a log file, say 315You can also redirect the above output to a log file, say
287@file{output.log}, and use the 316@file{output.log}, and use the
288@code{ert-summarize-tests-batch-and-exit} function to produce a neat 317@code{ert-summarize-tests-batch-and-exit} function to produce a neat
@@ -314,6 +343,8 @@ files that it requires are on your @code{load-path}.
314 343
315@node Test Selectors 344@node Test Selectors
316@section Test Selectors 345@section Test Selectors
346@cindex test selector
347@cindex selecting tests
317 348
318Functions like @code{ert} accept a @emph{test selector}, a Lisp 349Functions like @code{ert} accept a @emph{test selector}, a Lisp
319expression specifying a set of tests. Test selector syntax is similar 350expression specifying a set of tests. Test selector syntax is similar
@@ -328,17 +359,22 @@ to Common Lisp's type specifier syntax:
328@item A string is a regular expression that selects all tests with matching names. 359@item A string is a regular expression that selects all tests with matching names.
329@item A test (i.e., an object of @code{ert-test} data type) selects that test. 360@item A test (i.e., an object of @code{ert-test} data type) selects that test.
330@item A symbol selects the test that the symbol names. 361@item A symbol selects the test that the symbol names.
331@item @code{(member TESTS...)} selects the elements of TESTS, a list of 362@item @code{(member @var{tests}...)} selects the elements of
332tests or symbols naming tests. 363@var{tests}, a list of tests or symbols naming tests.
333@item @code{(eql TEST)} selects TEST, a test or a symbol naming a test. 364@item @code{(eql @var{test})} selects @var{test}, a test or a symbol
334@item @code{(and SELECTORS...)} selects the tests that match all SELECTORS. 365naming a test.
335@item @code{(or SELECTORS...)} selects the tests that match any SELECTOR. 366@item @code{(and @var{selectors}@dots{})} selects the tests that match
336@item @code{(not SELECTOR)} selects all tests that do not match SELECTOR. 367all @var{selectors}.
337@item @code{(tag TAG)} selects all tests that have TAG on their tags list. 368@item @code{(or @var{selectors}@dots{})} selects the tests that match
369any of the @var{selectors}.
370@item @code{(not @var{selector})} selects all tests that do not match
371@var{selector}.
372@item @code{(tag @var{tag})} selects all tests that have @var{tag} on
373their tags list.
338(Tags are optional labels you can apply to tests when you define them.) 374(Tags are optional labels you can apply to tests when you define them.)
339@item @code{(satisfies PREDICATE)} selects all tests that satisfy PREDICATE, 375@item @code{(satisfies @var{predicate})} selects all tests that
340a function that takes a test as argument and returns non-@code{nil} if 376satisfy @var{predicate}, a function that takes a test as argument and
341it is selected. 377returns non-@code{nil} if it is selected.
342@end itemize 378@end itemize
343 379
344Selectors that are frequently useful when selecting tests to run 380Selectors that are frequently useful when selecting tests to run
@@ -354,7 +390,9 @@ result in the last run, and tag-based selectors such as @code{(not
354 390
355@node How to Write Tests 391@node How to Write Tests
356@chapter How to Write Tests 392@chapter How to Write Tests
393@cindex how to write tests
357 394
395@findex ert-deftest
358ERT lets you define tests in the same way you define functions. You 396ERT lets you define tests in the same way you define functions. You
359can type @code{ert-deftest} forms in a buffer and evaluate them there 397can type @code{ert-deftest} forms in a buffer and evaluate them there
360with @code{eval-defun} or @code{compile-defun}, or you can save the 398with @code{eval-defun} or @code{compile-defun}, or you can save the
@@ -375,6 +413,7 @@ to find where a test was defined if the test was loaded from a file.
375@node The @code{should} Macro 413@node The @code{should} Macro
376@section The @code{should} Macro 414@section The @code{should} Macro
377 415
416@findex should@r{, ert macro}
378Test bodies can include arbitrary code; but to be useful, they need to 417Test bodies can include arbitrary code; but to be useful, they need to
379check whether the code being tested (or @emph{code under test}) 418check whether the code being tested (or @emph{code under test})
380does what it is supposed to do. The macro @code{should} is similar to 419does what it is supposed to do. The macro @code{should} is similar to
@@ -410,6 +449,8 @@ test failed, it helps to know that the function @code{+} returned 3
410here. ERT records the return value for any predicate called directly 449here. ERT records the return value for any predicate called directly
411within @code{should}. 450within @code{should}.
412 451
452@findex should-not@r{, ert macro}
453@findex should-error@r{, ert macro}
413In addition to @code{should}, ERT provides @code{should-not}, which 454In addition to @code{should}, ERT provides @code{should-not}, which
414checks that the predicate returns @code{nil}, and @code{should-error}, which 455checks that the predicate returns @code{nil}, and @code{should-error}, which
415checks that the form called within it signals an error. An example 456checks that the form called within it signals an error. An example
@@ -438,7 +479,10 @@ default.
438 479
439@node Expected Failures 480@node Expected Failures
440@section Expected Failures 481@section Expected Failures
482@cindex expected failures
483@cindex known bugs
441 484
485@vindex :expected-result
442Some bugs are complicated to fix, or not very important, and are left as 486Some bugs are complicated to fix, or not very important, and are left as
443@emph{known bugs}. If there is a test case that triggers the bug and 487@emph{known bugs}. If there is a test case that triggers the bug and
444fails, ERT will alert you of this failure every time you run all 488fails, ERT will alert you of this failure every time you run all
@@ -492,6 +536,9 @@ versions, specific architectures, etc.:
492@node Tests and Their Environment 536@node Tests and Their Environment
493@section Tests and Their Environment 537@section Tests and Their Environment
494 538
539@cindex skipping tests
540@cindex test preconditions
541@cindex preconditions of a test
495Sometimes, it doesn't make sense to run a test due to missing 542Sometimes, it doesn't make sense to run a test due to missing
496preconditions. A required Emacs feature might not be compiled in, the 543preconditions. A required Emacs feature might not be compiled in, the
497function to be tested could call an external binary which might not be 544function to be tested could call an external binary which might not be
@@ -505,6 +552,7 @@ available on the test machine, you name it. In this case, the macro
505 ...) 552 ...)
506@end lisp 553@end lisp
507 554
555@cindex tests and their environment
508The outcome of running a test should not depend on the current state 556The outcome of running a test should not depend on the current state
509of the environment, and each test should leave its environment in the 557of the environment, and each test should leave its environment in the
510same state it found it in. In particular, a test should not depend on 558same state it found it in. In particular, a test should not depend on
@@ -559,6 +607,8 @@ hook variables to @code{nil}. This avoids the above problems.
559 607
560@node Useful Techniques 608@node Useful Techniques
561@section Useful Techniques when Writing Tests 609@section Useful Techniques when Writing Tests
610@cindex useful techniques
611@cindex tips and tricks
562 612
563Testing simple functions that have no side effects and no dependencies 613Testing simple functions that have no side effects and no dependencies
564on their environment is easy. Such tests often look like this: 614on their environment is easy. Such tests often look like this:
@@ -596,6 +646,8 @@ Here's a more complicated test:
596 " signal(ert-test-failed (\"foo\"))"))))))) 646 " signal(ert-test-failed (\"foo\"))")))))))
597@end lisp 647@end lisp
598 648
649@findex make-ert-test
650@findex ert-equal-including-properties
599This test creates a test object using @code{make-ert-test} whose body 651This test creates a test object using @code{make-ert-test} whose body
600will immediately signal failure. It then runs that test and asserts 652will immediately signal failure. It then runs that test and asserts
601that it fails. Then, it creates a temporary buffer and invokes 653that it fails. Then, it creates a temporary buffer and invokes
@@ -653,6 +705,8 @@ a test failed.
653 705
654@node Understanding Explanations 706@node Understanding Explanations
655@section Understanding Explanations 707@section Understanding Explanations
708@cindex understanding explanations
709@cindex explanations, understanding
656 710
657Failed @code{should} forms are reported like this: 711Failed @code{should} forms are reported like this:
658 712
@@ -720,41 +774,55 @@ function registered. @xref{Defining Explanation Functions}.
720 774
721@node Interactive Debugging 775@node Interactive Debugging
722@section Interactive Debugging 776@section Interactive Debugging
777@cindex interactive debugging
778@cindex debugging failed tests
723 779
724Debugging failed tests essentially works the same way as debugging any 780Debugging failed tests essentially works the same way as debugging any
725other problems with Lisp code. Here are a few tricks specific to 781other problems with Lisp code. Here are a few tricks specific to
726tests: 782tests:
727 783
728@itemize 784@itemize
729@item Re-run the failed test a few times to see if it fails in the same way 785@cindex re-running a failed test
786@item
787Re-run the failed test a few times to see if it fails in the same way
730each time. It's good to find out whether the behavior is 788each time. It's good to find out whether the behavior is
731deterministic before spending any time looking for a cause. In the 789deterministic before spending any time looking for a cause. In the
732ERT results buffer, @kbd{r} re-runs the selected test. 790ERT results buffer, @kbd{r} re-runs the selected test.
733 791
734@item Use @kbd{.} to jump to the source code of the test to find out exactly 792@cindex jump to the test source code
793@item
794Use @kbd{.} to jump to the source code of the test to find out exactly
735what it does. Perhaps the test is broken rather than the code 795what it does. Perhaps the test is broken rather than the code
736under test. 796under test.
737 797
738@item If the test contains a series of @code{should} forms and you can't 798@item
799If the test contains a series of @code{should} forms and you can't
739tell which one failed, use @kbd{l}, which shows you the list of all 800tell which one failed, use @kbd{l}, which shows you the list of all
740@code{should} forms executed during the test before it failed. 801@code{should} forms executed during the test before it failed.
741 802
742@item Use @kbd{b} to view the backtrace. You can also use @kbd{d} to re-run 803@cindex show backtrace of failed test
804@item
805Use @kbd{b} to view the backtrace. You can also use @kbd{d} to re-run
743the test with debugging enabled, this will enter the debugger and show 806the test with debugging enabled, this will enter the debugger and show
744the backtrace as well; but the top few frames shown there will not be 807the backtrace as well; but the top few frames shown there will not be
745relevant to you since they are ERT's own debugger hook. @kbd{b} 808relevant to you since they are ERT's own debugger hook. @kbd{b}
746strips them out, so it is more convenient. 809strips them out, so it is more convenient.
747 810
748@item If the test or the code under testing prints messages using 811@item
812If the test or the code under testing prints messages using
749@code{message}, use @kbd{m} to see what messages it printed before it 813@code{message}, use @kbd{m} to see what messages it printed before it
750failed. This can be useful to figure out how far it got. 814failed. This can be useful to figure out how far it got.
751 815
752@item You can instrument tests for debugging the same way you instrument 816@cindex instrumenting test for Edebug
817@item
818You can instrument tests for debugging the same way you instrument
753@code{defun}s for debugging: go to the source code of the test and 819@code{defun}s for debugging: go to the source code of the test and
754type @kbd{@kbd{C-u} @kbd{C-M-x}}. Then, go back to the ERT buffer and 820type @kbd{@kbd{C-u} @kbd{C-M-x}}. Then, go back to the ERT buffer and
755re-run the test with @kbd{r} or @kbd{d}. 821re-run the test with @kbd{r} or @kbd{d}.
756 822
757@item If you have been editing and rearranging tests, it is possible that 823@cindex discard obsolete test results
824@item
825If you have been editing and rearranging tests, it is possible that
758ERT remembers an old test that you have since renamed or removed: 826ERT remembers an old test that you have since renamed or removed:
759renamings or removals of definitions in the source code leave around a 827renamings or removals of definitions in the source code leave around a
760stray definition under the old name in the running process (this is a 828stray definition under the old name in the running process (this is a
@@ -765,6 +833,7 @@ forget about the obsolete test.
765 833
766@node Extending ERT 834@node Extending ERT
767@chapter Extending ERT 835@chapter Extending ERT
836@cindex extending ert
768 837
769There are several ways to add functionality to ERT. 838There are several ways to add functionality to ERT.
770 839
@@ -776,6 +845,7 @@ There are several ways to add functionality to ERT.
776 845
777@node Defining Explanation Functions 846@node Defining Explanation Functions
778@section Defining Explanation Functions 847@section Defining Explanation Functions
848@cindex defining explanation functions
779 849
780The explanation function for a predicate is a function that takes the 850The explanation function for a predicate is a function that takes the
781same arguments as the predicate and returns an @emph{explanation}. 851same arguments as the predicate and returns an @emph{explanation}.
@@ -786,6 +856,7 @@ comprehensible printed representation. If the return value of the
786predicate needs no explanation for a given list of arguments, the 856predicate needs no explanation for a given list of arguments, the
787explanation function should return @code{nil}. 857explanation function should return @code{nil}.
788 858
859@vindex ert-explainer@r{, property}
789To associate an explanation function with a predicate, add the 860To associate an explanation function with a predicate, add the
790property @code{ert-explainer} to the symbol that names the predicate. 861property @code{ert-explainer} to the symbol that names the predicate.
791The value of the property should be the symbol that names the 862The value of the property should be the symbol that names the
@@ -794,6 +865,7 @@ explanation function.
794 865
795@node Low-Level Functions for Working with Tests 866@node Low-Level Functions for Working with Tests
796@section Low-Level Functions for Working with Tests 867@section Low-Level Functions for Working with Tests
868@cindex low-level functions
797 869
798Both @code{ert-run-tests-interactively} and @code{ert-run-tests-batch} 870Both @code{ert-run-tests-interactively} and @code{ert-run-tests-batch}
799are implemented on top of the lower-level test handling code in the 871are implemented on top of the lower-level test handling code in the
@@ -821,6 +893,7 @@ For information on mocks, stubs, fixtures, or test suites, see below.
821 893
822@node Mocks and Stubs 894@node Mocks and Stubs
823@section Other Tools for Emacs Lisp 895@section Other Tools for Emacs Lisp
896@cindex mocks and stubs
824 897
825Stubbing out functions or using so-called @emph{mocks} can make it 898Stubbing out functions or using so-called @emph{mocks} can make it
826easier to write tests. See 899easier to write tests. See
@@ -834,6 +907,7 @@ offers mocks for Emacs Lisp and can be used in conjunction with ERT.
834 907
835@node Fixtures and Test Suites 908@node Fixtures and Test Suites
836@section Fixtures and Test Suites 909@section Fixtures and Test Suites
910@cindex fixtures
837 911
838In many ways, ERT is similar to frameworks for other languages like 912In many ways, ERT is similar to frameworks for other languages like
839SUnit or JUnit. However, two features commonly found in such 913SUnit or JUnit. However, two features commonly found in such
@@ -891,6 +965,11 @@ e.g., to run quick tests during interactive development and slow tests less
891often. This can be achieved with the @code{:tag} argument to 965often. This can be achieved with the @code{:tag} argument to
892@code{ert-deftest} and @code{tag} test selectors. 966@code{ert-deftest} and @code{tag} test selectors.
893 967
968@node Index
969@unnumbered Index
970
971@printindex cp
972
894@node GNU Free Documentation License 973@node GNU Free Documentation License
895@appendix GNU Free Documentation License 974@appendix GNU Free Documentation License
896@include doclicense.texi 975@include doclicense.texi
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index b0a56492bcd..e2a80bb5f11 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -65,7 +65,7 @@ modify this GNU manual.''
65@cindex using flymake 65@cindex using flymake
66 66
67Flymake is a universal on-the-fly buffer checker implemented as an 67Flymake is a universal on-the-fly buffer checker implemented as an
68Emacs minor minor. To use Flymake, you must first activate 68Emacs minor mode. To use Flymake, you must first activate
69@code{flymake-mode} by using the command @kbd{flymake-mode}. 69@code{flymake-mode} by using the command @kbd{flymake-mode}.
70 70
71When enabled, Flymake collects information about problems in the 71When enabled, Flymake collects information about problems in the
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 33078d711a2..169509bae9e 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -21391,7 +21391,7 @@ correct group name @samp{mail.misc}.
21391 21391
21392Extra switches may be passed to the namazu search command by setting the 21392Extra switches may be passed to the namazu search command by setting the
21393variable @code{nnir-namazu-additional-switches}. It is particularly 21393variable @code{nnir-namazu-additional-switches}. It is particularly
21394important not to pass any any switches to namazu that will change the 21394important not to pass any switches to namazu that will change the
21395output format. Good switches to use include @option{--sort}, 21395output format. Good switches to use include @option{--sort},
21396@option{--ascending}, @option{--early} and @option{--late}. 21396@option{--ascending}, @option{--early} and @option{--late}.
21397Refer to the Namazu documentation for further 21397Refer to the Namazu documentation for further
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi
index 4e395f7a112..374c72402a5 100644
--- a/doc/misc/sem-user.texi
+++ b/doc/misc/sem-user.texi
@@ -953,7 +953,7 @@ list, you can use @kbd{M-x semanticdb-find-test-translate-path}.
953@xref{Semanticdb search debugging commands}. 953@xref{Semanticdb search debugging commands}.
954 954
955If items should be loaded but aren't, or if you see some tables that 955If items should be loaded but aren't, or if you see some tables that
956have no tags in them, then you you may have an incorrectly-set search 956have no tags in them, then you may have an incorrectly-set search
957throttle (@pxref{Search Throttle}). For example, 957throttle (@pxref{Search Throttle}). For example,
958 958
959@example 959@example
diff --git a/doc/misc/srecode.texi b/doc/misc/srecode.texi
index 74904f37e1e..80bf85c3a71 100644
--- a/doc/misc/srecode.texi
+++ b/doc/misc/srecode.texi
@@ -511,7 +511,7 @@ to insert it anywhere in the template search list.
511If there are multiple templates with the same context and name, the 511If there are multiple templates with the same context and name, the
512template with the highest priority number will be used. 512template with the highest priority number will be used.
513 513
514If multiple files have the same priority, then then sort order is 514If multiple files have the same priority, then the sort order is
515unpredictable. If no template names match, then it doesn't matter. 515unpredictable. If no template names match, then it doesn't matter.
516 516
517Example: 517Example: