aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2022-07-09 10:54:01 +0200
committerStefan Kangas2022-07-09 11:47:52 +0200
commitecb2eccad56518992426500dd8119024ea8288a8 (patch)
treea927f2f1fac478d0e5170dea294a6aa875b12c55
parentd74dad673b854b011b23853d298c9a8f86d2d6ad (diff)
downloademacs-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.texi2
-rw-r--r--lisp/emacs-lisp/ert.el10
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
822question is multi-line. 822question is multi-line.
823 823
824So ert provides a function called @code{ert-test-erts-file} that takes 824So ert provides a function called @code{ert-test-erts-file} that takes
825two parameters: The name of a specially-formatted @dfn{erts} file, and 825two 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).
2884TRANSFORM will be called to get from before to after." 2884
2885This function puts the \"before\" section of an .erts file into a
2886temporary buffer, calls the TRANSFORM function, and then compares
2887the result with the \"after\" section.
2888
2889See Info node `(ert) erts files' for more information on how to
2890write 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)