[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 bbcb079 06/39: Allow running Flymake tests from i
From: |
João Távora |
Subject: |
[Emacs-diffs] emacs-26 bbcb079 06/39: Allow running Flymake tests from interactive sessions |
Date: |
Tue, 3 Oct 2017 10:04:45 -0400 (EDT) |
branch: emacs-26
commit bbcb079522e12d8b9d416a8472a2966cc6d83a5a
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Allow running Flymake tests from interactive sessions
* test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
Expand to reasonable value if no
EMACS_TEST_DIRECTORY. (flymake-tests--current-face): Work around
"weirdness" of bug 17647 with read-event.
---
test/lisp/progmodes/flymake-tests.el | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/test/lisp/progmodes/flymake-tests.el
b/test/lisp/progmodes/flymake-tests.el
index a018f11..338e8e0 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -26,7 +26,11 @@
(require 'flymake)
(defvar flymake-tests-data-directory
- (expand-file-name "lisp/progmodes/flymake-resources" (getenv
"EMACS_TEST_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.")
@@ -41,8 +45,17 @@
(setq-local flymake-proc-warning-predicate predicate)
(goto-char (point-min))
(flymake-mode 1)
- ;; Weirdness here... https://debbugs.gnu.org/17647#25
+ ;; Weirdness here... http://debbugs.gnu.org/17647#25
+ ;; ... meaning `sleep-for', and even
+ ;; `accept-process-output', won't suffice as ways to get
+ ;; process filters and sentinels to run, though they do work
+ ;; fine in a non-interactive batch session. The only thing
+ ;; that will indeed unblock pending process output is
+ ;; reading an input event, so, as a workaround, use a dummy
+ ;; `read-event' with a very short timeout.
+ (unless noninteractive (read-event "" nil 0.1))
(while (and flymake-is-running (< (setq i (1+ i)) 10))
+ (unless noninteractive (read-event "" nil 0.1))
(sleep-for (+ 0.5 flymake-no-changes-timeout)))
(flymake-goto-next-error)
(face-at-point))
@@ -59,7 +72,7 @@
(skip-unless (and (executable-find "gcc") (executable-find "make")))
(should (eq 'flymake-warning
(flymake-tests--current-face "test.c"
- (lambda (msg) (string-match "^[Ww]arning" msg))))))
+ (lambda (msg) (string-match
"^[Ww]arning" msg))))))
(ert-deftest warning-predicate-rx-perl ()
"Test perl warning via regular expression predicate."
- [Emacs-diffs] emacs-26 updated (0fff900 -> ca08b69), João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 bbcb079 06/39: Allow running Flymake tests from interactive sessions,
João Távora <=
- [Emacs-diffs] emacs-26 1c30f9f 05/39: Flymake diagnostics now apply to arbitrary buffer regions, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 8c85ab0 12/39: Echo Flymake error messages when navigating errors interactively, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 0d26e45 11/39: Add a new Flymake test for multiple errors and warnings, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 54beebb 14/39: Flymake highlights GCC info/notes as detected by flymake-proc.el, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 f1601be 02/39: Flymake provides flymake-report re-entry point for backends, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 ae64bf1 08/39: New Flymake variable flymake-diagnostic-types-alist and much cleanup, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 6954270 03/39: Completely rewrite Flymake's subprocess output processing, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 f930963 18/39: Simplify Flymake logging and erroring, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 734aa88 09/39: Flymake's flymake-proc.el parses column numbers from gcc/javac errors, João Távora, 2017/10/03
- [Emacs-diffs] emacs-26 9f8ad13 07/39: Refactor Flymake tests in preparation for more tests, João Távora, 2017/10/03