diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2022-01-07 20:34:08 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2022-01-07 20:34:08 +0200 |
commit | 9c00d6c3f6f45755a20d093bbd821673fc7ac405 (patch) | |
tree | 2178726a5bf353f6dbfc0154aca253685ca79774 /test/lisp/progmodes/flymake-tests.el | |
parent | ebcba77d4c47ceff24115f80c2109916a6b425b1 (diff) | |
parent | f424ef88e2cae6d3fb06041d63902af2b8cffe9b (diff) | |
download | emacs-9c00d6c3f6f45755a20d093bbd821673fc7ac405.tar.gz |
Merge branch 'master' into scratch/etags-regen
Diffstat (limited to 'test/lisp/progmodes/flymake-tests.el')
-rw-r--r-- | test/lisp/progmodes/flymake-tests.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el index 4840018236a..ced7b5aaced 100644 --- a/test/lisp/progmodes/flymake-tests.el +++ b/test/lisp/progmodes/flymake-tests.el @@ -1,6 +1,6 @@ ;;; flymake-tests.el --- Test suite for flymake -*- lexical-binding: t -*- -;; Copyright (C) 2011-2021 Free Software Foundation, Inc. +;; Copyright (C) 2011-2022 Free Software Foundation, Inc. ;; Author: Eduard Wiebe <usenet@pusto.de> @@ -140,9 +140,15 @@ SEVERITY-PREDICATE is used to setup (flymake-goto-next-error) (should (eq 'flymake-error (face-at-point))))))) +(defun flymake-tests--gcc-is-clang () + "Whether the `gcc' command actually runs the Clang compiler." + (string-match "[Cc]lang version " + (shell-command-to-string "gcc --version"))) + (ert-deftest different-diagnostic-types () "Test GCC warning via function predicate." (skip-unless (and (executable-find "gcc") + (not (flymake-tests--gcc-is-clang)) (version<= "5" (string-trim (shell-command-to-string "gcc -dumpversion"))) @@ -166,7 +172,9 @@ SEVERITY-PREDICATE is used to setup (ert-deftest included-c-header-files () "Test inclusion of .h header files." - (skip-unless (and (executable-find "gcc") (executable-find "make"))) + (skip-unless (and (executable-find "gcc") + (not (flymake-tests--gcc-is-clang)) + (executable-find "make"))) (let ((flymake-wrap-around nil)) (flymake-tests--with-flymake ("some-problems.h") |