emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6ad628b 1/2: Improve ert-resource-directory docstring


From: Stefan Kangas
Subject: master 6ad628b 1/2: Improve ert-resource-directory docstring
Date: Mon, 2 Nov 2020 18:12:43 -0500 (EST)

branch: master
commit 6ad628b8657d840de1c9ac07e653d945e2a88889
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Improve ert-resource-directory docstring
    
    * lisp/emacs-lisp/ert-x.el (ert-resource-directory): Improve
    docstring.
---
 lisp/emacs-lisp/ert-x.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index abbff6d..a8da2c4 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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]