unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* New package, faceup, for font-lock regression testing
@ 2017-10-26 19:33 Anders Lindgren
  0 siblings, 0 replies; only message in thread
From: Anders Lindgren @ 2017-10-26 19:33 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]

Hi!

I just added a new module to Emacs, "faceup". The main purpose of this
module is for regression testing of font-lock keywords. It is designed
to work with the built-in ERT regression test system. It has been
available on GitHub and on Melpa for a couple of years. The motivation
for including it in Emacs is to modernize the tests for the built-in
modes.

"Faceup" is a semi-human readable markup language, that looks like the
following:

    «k:this» is a keyword

Common font-lock keywords use a short form, "k" in this case represent
`font-lock-keyword-face'. Other faces, or plain face attributes, use a
more verbose format.

The idea is that test suites for various modes can use this markup
format to save a source file, with highlighting. The regression test
can later compare this with the current highlighting.

The system scales well. In some of my projects I've applied it to
files thousands of lines long.

Of course, the Faceup markup language can be used for other purposes
as well. One example that comes to mind is that it should be possible
to used it as the storage format for a rich-text mode.

The following are concrete examples where this package has been used
for regression testing:

    https://github.com/Lindydancer/lisp-extra-font-lock

    https://github.com/Lindydancer/cmake-font-lock

    https://github.com/Lindydancer/nocomments-mode

    https://github.com/Lindydancer/preproc-font-lock

    https://github.com/Lindydancer/objc-font-lock

In addition, for various major modes, I've collected "typical"
non-trivial source files:

    https://github.com/Lindydancer/font-lock-regression-suite

See bug#16063 and bug#28311 for more information.

    -- Anders Lindgren

[-- Attachment #2: Type: text/html, Size: 2765 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-26 19:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-26 19:33 New package, faceup, for font-lock regression testing Anders Lindgren

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).