changeset 38703:b93dc48e74ad

hghave: require clang-format >= 6 due to output change
author Yuya Nishihara <yuya@tcha.org>
date Sat, 14 Jul 2018 10:51:52 +0900
parents 992e108212a9
children 607e2a2501e6
files tests/hghave.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Sat Jul 14 10:50:10 2018 +0900
+++ b/tests/hghave.py	Sat Jul 14 10:51:52 2018 +0900
@@ -452,8 +452,9 @@
 
 @check("clang-format", "clang-format C code formatter")
 def has_clang_format():
-    return matchoutput("clang-format --help",
-                       br"^OVERVIEW: A tool to format C/C\+\+[^ ]+ code.")
+    m = matchoutput('clang-format --version', br'clang-format version (\d)')
+    # style changed somewhere between 4.x and 6.x
+    return m and int(m.group(1)) >= 6
 
 @check("jshint", "JSHint static code analysis tool")
 def has_jshint():