diff options
| author | Stefan Kangas | 2022-07-09 10:54:01 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-07-09 11:47:52 +0200 |
| commit | ecb2eccad56518992426500dd8119024ea8288a8 (patch) | |
| tree | a927f2f1fac478d0e5170dea294a6aa875b12c55 | |
| parent | d74dad673b854b011b23853d298c9a8f86d2d6ad (diff) | |
| download | emacs-ecb2eccad56518992426500dd8119024ea8288a8.tar.gz emacs-ecb2eccad56518992426500dd8119024ea8288a8.zip | |
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.
| -rw-r--r-- | doc/misc/ert.texi | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/ert.el | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi index 4dccd8edcf0..1b7f38daadf 100644 --- a/doc/misc/ert.texi +++ b/doc/misc/ert.texi | |||
| @@ -822,7 +822,7 @@ that's pretty difficult to read and write, especially when the text in | |||
| 822 | question is multi-line. | 822 | question is multi-line. |
| 823 | 823 | ||
| 824 | So ert provides a function called @code{ert-test-erts-file} that takes | 824 | So ert provides a function called @code{ert-test-erts-file} that takes |
| 825 | two parameters: The name of a specially-formatted @dfn{erts} file, and | 825 | two parameters: the name of a specially-formatted @dfn{erts} file, and |
| 826 | (optionally) a function that performs the transform. | 826 | (optionally) a function that performs the transform. |
| 827 | 827 | ||
| 828 | @findex erts-mode | 828 | @findex erts-mode |
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 21bee4c6d8b..49b54c2d00f 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el | |||
| @@ -2880,8 +2880,14 @@ To be used in the ERT results buffer." | |||
| 2880 | nil) | 2880 | nil) |
| 2881 | 2881 | ||
| 2882 | (defun ert-test-erts-file (file &optional transform) | 2882 | (defun ert-test-erts-file (file &optional transform) |
| 2883 | "Parse FILE as a file containing before/after parts. | 2883 | "Parse FILE as a file containing before/after parts (an erts file). |
| 2884 | TRANSFORM will be called to get from before to after." | 2884 | |
| 2885 | This function puts the \"before\" section of an .erts file into a | ||
| 2886 | temporary buffer, calls the TRANSFORM function, and then compares | ||
| 2887 | the result with the \"after\" section. | ||
| 2888 | |||
| 2889 | See Info node `(ert) erts files' for more information on how to | ||
| 2890 | write erts files." | ||
| 2885 | (with-temp-buffer | 2891 | (with-temp-buffer |
| 2886 | (insert-file-contents file) | 2892 | (insert-file-contents file) |
| 2887 | (let ((gen-specs (list (cons 'dummy t) | 2893 | (let ((gen-specs (list (cons 'dummy t) |