]> git.eshelyaron.com Git - emacs.git/commit
Refactor flymake-tests.el in preparation for more tests
authorJoão Távora <joaotavora@gmail.com>
Thu, 7 Sep 2017 13:19:33 +0000 (14:19 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 2 Oct 2017 23:53:11 +0000 (00:53 +0100)
commit86a4f30c3c37d5d035a84ebe8c891f6a04d8a10d
tree40a346d30f133330de6bf1ff1dfb988474c4525e
parent79867d387f24f4bf41934a64eaa1dc742e5cbee6
Refactor flymake-tests.el in preparation for more tests

Introduce a slightly more generic fixture macro.

Also make flymake-tests.el friendlier to interactive runs, by not
killing buffers visited by the user.

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--call-with-fixture): New helper from
flymake-tests--current-face.  Don't kill file buffers already
being visited before the test starts.
(flymake-tests--with-flymake): New macro.
(flymake-tests--current-face): Delete.
(warning-predicate-rx-gcc, warning-predicate-function-gcc)
(warning-predicate-rx-perl, warning-predicate-function-perl):
Use flymake-test--with-flymake.
test/lisp/progmodes/flymake-tests.el