summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2020-11-02 19:06:46 +0100
committerStefan Kangas <stefan@marxist.se>2020-11-03 00:11:02 +0100
commit6ad628b8657d840de1c9ac07e653d945e2a88889 (patch)
treeb60d47c00c86443f24af81c83841292caed5493c /lisp/emacs-lisp
parenta8f04014c2ba99ee8a5c17c85f4db671ef707773 (diff)
downloademacs-6ad628b8657d840de1c9ac07e653d945e2a88889.tar.gz
emacs-6ad628b8657d840de1c9ac07e653d945e2a88889.tar.bz2
emacs-6ad628b8657d840de1c9ac07e653d945e2a88889.zip
Improve ert-resource-directory docstring
* lisp/emacs-lisp/ert-x.el (ert-resource-directory): Improve docstring.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/ert-x.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index abbff6da625..a8da2c413e0 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -363,18 +363,19 @@ convert it to a string and pass it to COLLECTOR first."
;; Has to be a macro for `load-file-name'.
(defmacro ert-resource-directory ()
- "Return absolute file name of the resource directory for this file.
+ "Return absolute file name of the resource (test data) directory.
The path to the resource directory is the \"resources\" directory
-in the same directory as the test file.
-
-If that directory doesn't exist, use the directory named like the
-test file but formatted by `ert-resource-directory-format' and trimmed
-using `string-trim' with arguments
+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
`ert-resource-directory-trim-left-regexp' and
-`ert-resource-directory-trim-right-regexp'. The default values mean
-that if called from a test file named \"foo-tests.el\", return
-the absolute file name for \"foo-resources\"."
+`ert-resource-directory-trim-right-regexp'."
`(let* ((testfile ,(or (bound-and-true-p byte-compile-current-file)
(and load-in-progress load-file-name)
buffer-file-name))