]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
authorPhilipp Stephani <phst@google.com>
Sun, 25 Oct 2020 09:59:11 +0000 (10:59 +0100)
committerPhilipp Stephani <phst@google.com>
Sun, 25 Oct 2020 09:59:11 +0000 (10:59 +0100)
Flymake supports all Emacs versions back to 26.1, so it can’t use
‘ert-resource-file’.

* test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
Recreate.
(flymake-tests--call-with-fixture): Stop using ‘ert-resource-file’.

test/lisp/progmodes/flymake-tests.el

index c62a2dbde13fa435a9f3f9914ec5aa0a9d474c58..df72b523a9dcd0c9b675d94e4fe6b4788ad9cc0e 100644 (file)
 
 ;;; Code:
 (require 'ert)
-(require 'ert-x)
 (require 'flymake)
 (eval-when-compile (require 'subr-x)) ; string-trim
 
+(defvar flymake-tests-data-directory
+  (expand-file-name "lisp/progmodes/flymake-resources"
+                    (or (getenv "EMACS_TEST_DIRECTORY")
+                        (expand-file-name "../../.."
+                                          (or load-file-name
+                                              buffer-file-name))))
+  "Directory containing flymake test data.")
+
 \f
 ;;
 ;;
@@ -56,7 +63,7 @@
   "Call FN after flymake setup in FILE, using `flymake-proc`.
 SEVERITY-PREDICATE is used to setup
 `flymake-proc-diagnostic-type-pred'"
-  (let* ((file (ert-resource-file file))
+  (let* ((file (expand-file-name file flymake-tests-data-directory))
          (visiting (find-buffer-visiting file))
          (buffer (or visiting (find-file-noselect file)))
          (process-environment (cons "LC_ALL=C" process-environment))