Improve ert-test-erts-file documentation
* lisp/emacs-lisp/ert.el (ert-test-erts-file): Improve docstring. * doc/misc/ert.texi (erts files): Fix typo.
This commit is contained in:
parent
d74dad673b
commit
ecb2eccad5
2 changed files with 9 additions and 3 deletions
|
@ -822,7 +822,7 @@ that's pretty difficult to read and write, especially when the text in
|
|||
question is multi-line.
|
||||
|
||||
So ert provides a function called @code{ert-test-erts-file} that takes
|
||||
two parameters: The name of a specially-formatted @dfn{erts} file, and
|
||||
two parameters: the name of a specially-formatted @dfn{erts} file, and
|
||||
(optionally) a function that performs the transform.
|
||||
|
||||
@findex erts-mode
|
||||
|
|
|
@ -2880,8 +2880,14 @@ To be used in the ERT results buffer."
|
|||
nil)
|
||||
|
||||
(defun ert-test-erts-file (file &optional transform)
|
||||
"Parse FILE as a file containing before/after parts.
|
||||
TRANSFORM will be called to get from before to after."
|
||||
"Parse FILE as a file containing before/after parts (an erts file).
|
||||
|
||||
This function puts the \"before\" section of an .erts file into a
|
||||
temporary buffer, calls the TRANSFORM function, and then compares
|
||||
the result with the \"after\" section.
|
||||
|
||||
See Info node `(ert) erts files' for more information on how to
|
||||
write erts files."
|
||||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(let ((gen-specs (list (cons 'dummy t)
|
||||
|
|
Loading…
Add table
Reference in a new issue