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/progmodes/cperl-mode-tests.el | |
parent | f52a775ae247419918404e50137e1cf6078bd865 (diff) | |
download | emacs-1f44a776729adf9c6468a76f8310616fde62eeaa.tar.gz emacs-1f44a776729adf9c6468a76f8310616fde62eeaa.tar.bz2 emacs-1f44a776729adf9c6468a76f8310616fde62eeaa.zip |
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/progmodes/cperl-mode-tests.el')
-rw-r--r-- | test/lisp/progmodes/cperl-mode-tests.el | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 20be7ed68cc..e2af2b5b8de 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -32,14 +32,7 @@ (require 'cperl-mode) (require 'ert) - -(defvar cperl-mode-tests-data-directory - (expand-file-name "lisp/progmodes/cperl-mode-resources" - (or (getenv "EMACS_TEST_DIRECTORY") - (expand-file-name "../../../" - (or load-file-name - buffer-file-name)))) - "Directory containing cperl-mode test data.") +(require 'ert-x) (defun cperl-test-ppss (text regexp) "Return the `syntax-ppss' of the first character matched by REGEXP in TEXT." @@ -149,8 +142,7 @@ These exercise some standard blocks and also the special treatment for Perl expressions where a closing paren isn't the end of the statement." (skip-unless (eq cperl-test-mode #'cperl-mode)) - (let ((file (expand-file-name "cperl-indent-exp.pl" - cperl-mode-tests-data-directory))) + (let ((file (ert-resource-file "cperl-indent-exp.pl"))) (with-temp-buffer (insert-file-contents file) (goto-char (point-min)) @@ -179,8 +171,7 @@ end of the statement." Perl Best Practices sets some indentation values different from the defaults, and also wants an \"else\" or \"elsif\" keyword to align with the \"if\"." - (let ((file (expand-file-name "cperl-indent-styles.pl" - cperl-mode-tests-data-directory))) + (let ((file (ert-resource-file "cperl-indent-styles.pl"))) (with-temp-buffer (cperl-set-style "PBP") (insert-file-contents file) |