summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/ert-x.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-09-28 14:32:06 +0200
committerStefan Kangas <stefan@marxist.se>2021-09-28 14:32:06 +0200
commita5b8140d4e5866b7e9e3fe88c0cd4b7914c949a5 (patch)
tree9d352603d9a41c0a9354a6bac7972bfe48cc3d61 /lisp/emacs-lisp/ert-x.el
parentb27a8f15549f12b363acfde8101849af10e9b401 (diff)
downloademacs-a5b8140d4e5866b7e9e3fe88c0cd4b7914c949a5.tar.gz
emacs-a5b8140d4e5866b7e9e3fe88c0cd4b7914c949a5.tar.bz2
emacs-a5b8140d4e5866b7e9e3fe88c0cd4b7914c949a5.zip
Improve docstrings of ert-resource-{directory,file}
* lisp/emacs-lisp/ert-x.el (ert-resource-directory) (ert-resource-file): Improve docstrings.
Diffstat (limited to 'lisp/emacs-lisp/ert-x.el')
-rw-r--r--lisp/emacs-lisp/ert-x.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index 59ec4d24849..3fc57d5182d 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -361,10 +361,11 @@ in the same directory as the test file this is called from.
If that directory doesn't exist, find a directory based on the
test file name. If the file is named \"foo-tests.el\", return
-the absolute file name for \"foo-resources\". If you want a
-different resource directory naming scheme, set the variable
-`ert-resource-directory-format'. Before formatting, the file
-name will be trimmed using `string-trim' with arguments
+the absolute file name for \"foo-resources\".
+
+If you want a different resource directory naming scheme, set the
+variable `ert-resource-directory-format'. Before formatting, the
+file name will be trimmed using `string-trim' with arguments
`ert-resource-directory-trim-left-regexp' and
`ert-resource-directory-trim-right-regexp'."
`(let* ((testfile ,(or (macroexp-file-name)
@@ -380,9 +381,9 @@ name will be trimmed using `string-trim' with arguments
ert-resource-directory-trim-right-regexp)))))))
(defmacro ert-resource-file (file)
- "Return file name of resource file named FILE.
-A resource file is in the resource directory as per
-`ert-resource-directory'."
+ "Return absolute file name of resource (test data) file named FILE.
+A resource file is defined as any file placed in the resource
+directory as returned by `ert-resource-directory'."
`(expand-file-name ,file (ert-resource-directory)))
(provide 'ert-x)