Improve docstrings of ert-resource-{directory,file}
* lisp/emacs-lisp/ert-x.el (ert-resource-directory) (ert-resource-file): Improve docstrings.
This commit is contained in:
parent
b27a8f1554
commit
a5b8140d4e
1 changed files with 8 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue