tests/test-check-clang-format.t
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 20 Nov 2020 13:24:45 -0800
changeset 45901 18489e26d9a0
parent 37186 0024961aa493
permissions -rw-r--r--
tests: make doctests not depend on str(ParseError()) format `ParseError` implements `__bytes__`, but it doesn't implement `__str__`, so it gets the default `__str__` implementation. The next patch will make it so `ParseError` gets a `__str__` implementation, which changes the format slightly. This prepares by making us not depend on the format. Differential Revision: https://phab.mercurial-scm.org/D9349

#require clang-format test-repo

  $ . "$TESTDIR/helpers-testrepo.sh"

  $ cd "$TESTDIR"/..
  $ for f in `testrepohg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"'` ; do
  >   clang-format --style file $f > $f.formatted
  >   cmp $f $f.formatted || diff -u $f $f.formatted
  >   rm $f.formatted
  > done