Mercurial > public > mercurial-scm > hg-stable
diff tests/test-check-clang-format.t @ 34834:2e8477059d4f
test-clang-format: new test to verify that files stay clang-formatted
For now all .c and .h files are blacklisted. As they become
clang-formatted, we'll remove them from the blacklist,and then this
test will produce output if there are diffs.
Differential Revision: https://phab.mercurial-scm.org/D1133
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 14 Sep 2015 14:17:27 -0400 |
parents | |
children | 39499bc31fcd |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-check-clang-format.t Mon Sep 14 14:17:27 2015 -0400 @@ -0,0 +1,10 @@ +#require clang-format test-repo + + $ . "$TESTDIR/helpers-testrepo.sh" + + $ cd "$TESTDIR"/.. + $ for f in `testrepohg files 'set:(**.c or **.h) and not "listfile:contrib/clang-format-blacklist"'` ; do + > clang-format --style file $f > $f.formatted + > cmp $f $f.formatted || diff -u $f $f.formatted + > rm $f.formatted + > done