aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2018-05-21 19:23:29 +0100
committerJoão Távora2018-05-21 19:23:42 +0100
commitf21db9e1206f830ee5e991a26f9e30056f68efb8 (patch)
tree102c1de331513238a016d191fbf9f76a22653c81
parentab37ceb9eecdd20b913d1b2b00d81e8f83e1caf7 (diff)
downloademacs-f21db9e1206f830ee5e991a26f9e30056f68efb8.tar.gz
emacs-f21db9e1206f830ee5e991a26f9e30056f68efb8.zip
Fix Flymake's ruby-mode tests when user has "rubocop" installed
The Flymake test suite fails if the "rubocop" program is installed, because the ruby-flymake-rubocop backend is selected automatically by ruby-flymake-auto. The test was designed for ruby-flymake-simple, tough, and fails. * test/lisp/progmodes/flymake-tests.el (ruby-backend): Ensure this test runs exclusively with the ruby-flymake-simple backend.
-rw-r--r--test/lisp/progmodes/flymake-tests.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el
index 5118e302405..bba1f12e691 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -118,6 +118,7 @@ SEVERITY-PREDICATE is used to setup
118 (flymake-goto-prev-error) 118 (flymake-goto-prev-error)
119 (should (eq 'flymake-error (face-at-point))))) 119 (should (eq 'flymake-error (face-at-point)))))
120 120
121(defvar ruby-mode-hook)
121(ert-deftest ruby-backend () 122(ert-deftest ruby-backend ()
122 "Test the ruby backend" 123 "Test the ruby backend"
123 (skip-unless (executable-find "ruby")) 124 (skip-unless (executable-find "ruby"))
@@ -129,11 +130,14 @@ SEVERITY-PREDICATE is used to setup
129 ;; for this particular yuckiness 130 ;; for this particular yuckiness
130 (abbreviated-home-dir nil)) 131 (abbreviated-home-dir nil))
131 (unwind-protect 132 (unwind-protect
132 (flymake-tests--with-flymake ("test.rb") 133 (let ((ruby-mode-hook
133 (flymake-goto-next-error) 134 (lambda ()
134 (should (eq 'flymake-warning (face-at-point))) 135 (setq flymake-diagnostic-functions '(ruby-flymake-simple)))))
135 (flymake-goto-next-error) 136 (flymake-tests--with-flymake ("test.rb")
136 (should (eq 'flymake-error (face-at-point)))) 137 (flymake-goto-next-error)
138 (should (eq 'flymake-warning (face-at-point)))
139 (flymake-goto-next-error)
140 (should (eq 'flymake-error (face-at-point)))))
137 (delete-directory tempdir t)))) 141 (delete-directory tempdir t))))
138 142
139(ert-deftest different-diagnostic-types () 143(ert-deftest different-diagnostic-types ()