From: Philipp Stephani Date: Sun, 25 Oct 2020 09:59:11 +0000 (+0100) Subject: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake. X-Git-Tag: emacs-28.0.90~5432 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2e090da77591c1e0f59815a34e2a4059f418c776;p=emacs.git Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake. 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’. --- diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el index c62a2dbde13..df72b523a9d 100644 --- a/test/lisp/progmodes/flymake-tests.el +++ b/test/lisp/progmodes/flymake-tests.el @@ -23,10 +23,17 @@ ;;; 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.") + ;; ;; @@ -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))