]> git.eshelyaron.com Git - emacs.git/commitdiff
Skip a Flymake test for old gcc versions
authorJoão Távora <joaotavora@gmail.com>
Fri, 20 Oct 2017 10:25:34 +0000 (11:25 +0100)
committerJoão Távora <joaotavora@gmail.com>
Fri, 20 Oct 2017 10:28:07 +0000 (11:28 +0100)
Fixes: 28906
* test/lisp/progmodes/flymake-tests.el
(different-diagnostic-types): Skip this test for gcc versions
< 5.

test/lisp/progmodes/flymake-tests.el

index 9f570adcc41eda9aa10822ad21bed498df47cb4a..eddd964ad14df43bf38b21f7717f0b41b0e7b9f7 100644 (file)
@@ -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")