(Or at least a close approximation.)
This way, the ERT progress information in the mode line will be removed from all windows immediately after the test run finishes, rather than lingering around in some windows until you switch to them.
This should have been part of the previous commit.
On my machine, now runs ~500 tests per second rather than ~110. (Batch mode runs ~4000 per second.)
Removed the code that was commented out. Dropped `ert-simulate-command-post-hook' since it's probably not useful. Its only use (in nxhtmltest-suites) was rather questionable since the test code had a permanent side-effect on the value of the hook. Dropped `ert-simulate-command-delay' since its implementation (renaming the current buffer to display a temporary message) seemed too brittle. Split out `ert-run-idle-timers' as a separate function since what it does is orthogonal. If someone wants a function with all the above features, they can easily write one as a private utility for their own tests; it can call `ert-simulate-command' and (conditionally) `ert-run-idle-timers', do whatever would go in the post-hook, display a message, and delay. Until a convincing implementation of such a combined utility function emerges, it is better for ERT to provide only the building blocks.
Dropped `buffer-contains-p' and `buffer-changes-p' since they are currently unused, don't simplify the calling code much, and spelling out their definitions in-line can actually lead to better error messages from `should'. Replaced `correctly-indented-p' with `ert-buffer-string-reindented'.
…instead. This is simpler to understand and use.
Also moved ert.texi from doc/lispref/ to doc/misc/ for now because proper integration with the Lisp manual probably requires some more work, at the very least replacing @chapter with @section, @section with @subsection etc., and we can do that work later.
This is the layout that XEmacs uses, and it's clearer, simpler and sufficient as long as we don't have too many tests.
…d-error'. Masatake YAMATO pointed out that these areas were unclear.
The new macro `ert-with-test-buffer' replaces both `with-test-buffer' and `ert-with-temp-buffer-include-file'. If you need input from files, combine `ert-with-temp-buffer' with `insert-file-contents'. The macro `with-test-buffer' was ad-hoc syntactic sugar around `insert', `goto-char', and `mark', and was not useful enough. Since test buffers are now linked from the results buffer, there no longer is a way to browse test buffers. Also gone is `ert-test-buffer-substitute'. It had too much overlap with `ert-filter-string' and was untested and unused.
This allows test code to add information to failure reports.
This simplifies the code slightly, but not as much I had hoped: The distinction between `ert-test-result-with-condition' and `ert-test-failed' remains because of `ert-test-quit', which I am reluctant to merge with `ert-test-failed'.