sapling/eden/scm/tests/test-check-clang-format.t

12 lines
374 B
Perl
Raw Normal View History

#chg-compatible
#require clang-format test-repo
$ . "$TESTDIR/helpers-testrepo.sh"
$ cd "$TESTDIR"/..
$ for f in `testrepohg files mercurial | egrep '\.(c|h)$' | egrep -v -f contrib/clang-format-blacklist` ; do
> clang-format --style file "$f" > "$TESTTMP/formatted.txt"
> cmp "$f" "$TESTTMP/formatted.txt" || diff -u "$f" "$TESTTMP/formatted.txt"
> done