[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ecb2eccad5 4/5: Improve ert-test-erts-file documentation
From: |
Stefan Kangas |
Subject: |
master ecb2eccad5 4/5: Improve ert-test-erts-file documentation |
Date: |
Sat, 9 Jul 2022 05:50:21 -0400 (EDT) |
branch: master
commit ecb2eccad56518992426500dd8119024ea8288a8
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
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.
---
doc/misc/ert.texi | 2 +-
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 4dccd8edcf..1b7f38daad 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
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
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index 21bee4c6d8..49b54c2d00 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."
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)