summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2017-10-20 11:25:34 +0100
committerJoão Távora <joaotavora@gmail.com>2017-10-20 11:28:07 +0100
commitd815de017bb531fed751ee0515ed90b73d7a9936 (patch)
tree1cfb100a902437550fd52b8d2edef54196468e9e /test
parentfd3d8610b27e26107ba15070aba0d488152f8f4d (diff)
downloademacs-d815de017bb531fed751ee0515ed90b73d7a9936.tar.gz
Skip a Flymake test for old gcc versions
Fixes: 28906 * test/lisp/progmodes/flymake-tests.el (different-diagnostic-types): Skip this test for gcc versions < 5.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/progmodes/flymake-tests.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el
index 9f570adcc41..eddd964ad14 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -24,6 +24,7 @@
;;; Code:
(require 'ert)
(require 'flymake)
+(require 'subr-x) ; string-trim
(defvar flymake-tests-data-directory
(expand-file-name "lisp/progmodes/flymake-resources"
@@ -128,7 +129,11 @@ SEVERITY-PREDICATE is used to setup
(ert-deftest different-diagnostic-types ()
"Test GCC warning via function predicate."
- (skip-unless (and (executable-find "gcc") (executable-find "make")))
+ (skip-unless (and (executable-find "gcc")
+ (version<=
+ "5" (string-trim
+ (shell-command-to-string "gcc -dumpversion")))
+ (executable-find "make")))
(let ((flymake-wrap-around nil))
(flymake-tests--with-flymake
("errors-and-warnings.c")