diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-09-24 02:05:58 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-10-16 11:28:09 +0200 |
commit | 1f44a776729adf9c6468a76f8310616fde62eeaa (patch) | |
tree | 8b1379037fcac877a229b805eca3d6d815875156 /test/lisp/calendar | |
parent | f52a775ae247419918404e50137e1cf6078bd865 (diff) | |
download | emacs-1f44a776729adf9c6468a76f8310616fde62eeaa.tar.gz |
Use new resource directory macros in tests (Bug#43792)
* test/lisp/bookmark-tests.el (bookmark-tests-data-dir):
* test/lisp/calendar/todo-mode-tests.el (todo-test-data-dir):
* test/lisp/net/dbus-tests.el (dbus--tests-dir):
* test/lisp/emacs-lisp/edebug-tests.el
(edebug-tests-sample-code-file):
* test/lisp/emacs-lisp/package-tests.el
(package-test-fake-contents-file):
* test/lisp/emacs-lisp/shadow-tests.el (shadow-tests-data-directory):
* test/lisp/emacs-lisp/testcover-tests.el
(testcover-tests-file-dir, testcover-tests-test-cases):
* test/lisp/mail/uudecode-tests.el (uudecode-tests-data-dir):
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-resource-directory):
* test/lisp/pcmpl-linux-tests.el (pcmpl-linux-tests-data-dir):
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-tests-data-directory):
* test/lisp/progmodes/flymake-tests.el
(flymake-tests-data-directory):
* test/lisp/progmodes/ruby-mode-tests.el (ruby-mode-tests-data-dir):
* test/lisp/saveplace-tests.el (saveplace-tests-dir):
* test/lisp/textmodes/css-mode-tests.el (css-mode-tests-data-dir):
Remove.
* test/lisp/bookmark-tests.el (bookmark-tests-bookmark-file)
(bookmark-tests-example-file, bookmark-tests-bookmark-file-list):
* test/lisp/calendar/todo-mode-tests.el (todo-test-file-1)
(todo-test-archive-1, with-todo-test, todo-test--add-file):
* test/lisp/custom-tests.el (custom--test-theme-variables):
* test/lisp/net/dbus-tests.el (dbus--test-introspect):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-setup-code-file):
* test/lisp/emacs-lisp/package-tests.el (package-test-data-dir)
(package-test-desc-from-buffer, package-test-install-single)
(package-test-macro-compilation)
(package-test-install-prioritized)
(package-test-install-multifile, package-test-update-archives)
(package-test-update-archives-async)
(package-test-update-archives/ignore-nil-entry)
(package-test-signed, package-x-test-upload-buffer)
(package-x-test-upload-new-version):
* test/lisp/emacs-lisp/shadow-tests.el (shadow-case-insensitive):
* test/lisp/emacs-lisp/testcover-tests.el
(testcover-tests-build-test-cases):
* test/lisp/mail/uudecode-tests.el (uudecode-tests-encoded-str)
(uudecode-tests-decoded-str):
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-file-archive)
(tramp-archive-test-directory):
* test/lisp/pcmpl-linux-tests.el (pcmpl-linux-test-fs-types)
(pcmpl-linux-test-mounted-directories):
* test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-bug-10483)
(cperl-mode-test-indent-styles):
* test/lisp/progmodes/flymake-tests.el
(flymake-tests--call-with-fixture):
* test/lisp/progmodes/ruby-mode-tests.el
(ruby--indent/converted-from-manual-test):
* test/lisp/saveplace-tests.el
(saveplace-test-save-place-to-alist/dir)
(saveplace-test-load-alist-from-file):
* test/lisp/textmodes/css-mode-tests.el (css-mode-test-indent): Adjust
to use new resource directory macros.
Diffstat (limited to 'test/lisp/calendar')
-rw-r--r-- | test/lisp/calendar/todo-mode-tests.el | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/test/lisp/calendar/todo-mode-tests.el b/test/lisp/calendar/todo-mode-tests.el index 1fbd39478c5..6ed55121988 100644 --- a/test/lisp/calendar/todo-mode-tests.el +++ b/test/lisp/calendar/todo-mode-tests.el @@ -28,19 +28,10 @@ (require 'ert-x) (require 'todo-mode) -(defvar todo-test-data-dir - (file-truename - (expand-file-name "todo-mode-resources/" - (file-name-directory (or load-file-name - buffer-file-name)))) - "Base directory of todo-mode.el test data files.") - -(defvar todo-test-file-1 (expand-file-name "todo-test-1.todo" - todo-test-data-dir) +(defvar todo-test-file-1 (ert-resource-file "todo-test-1.todo") "Todo mode test file.") -(defvar todo-test-archive-1 (expand-file-name "todo-test-1.toda" - todo-test-data-dir) +(defvar todo-test-archive-1 (ert-resource-file "todo-test-1.toda") "Todo Archive mode test file.") (defmacro with-todo-test (&rest body) @@ -52,7 +43,7 @@ (abbreviated-home-dir nil) (process-environment (cons (format "HOME=%s" todo-test-home) process-environment)) - (todo-directory todo-test-data-dir) + (todo-directory (ert-resource-directory)) (todo-default-todo-file (todo-short-file-name (car (funcall todo-files-function))))) (unwind-protect @@ -815,7 +806,7 @@ buffer from which the editing command was invoked." "Add file FILE with category CAT to todo-files and show it. This provides a noninteractive API for todo-add-file for use in automatic testing." - (let ((file0 (file-truename (concat todo-test-data-dir file ".todo"))) + (let ((file0 (ert-resource-file (concat file ".todo"))) todo-add-item-if-new-category) ; Don't need an item in cat. (cl-letf (((symbol-function 'todo-read-file-name) (lambda (_prompt) file0)) |