emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: ert-font-lock


From: Vladimir Kazanov
Subject: Re: [ELPA] New package: ert-font-lock
Date: Sun, 19 Nov 2023 10:02:09 +0000

> faceup.el is already included and seems to provide similar
> functionality. Vladimir could you provide a comparison between
> your package and faceup?

Sure!

I use Anders' set of tools intensively but faceup.el is not exactly
what I was looking for. Let me explain.

faceup.el dumps the current state of highlighting into a separate file
and makes it possible to report any differences. This makes it
possible to "freeze" some state and then make sure nothing happens in
the bigger picture. It provides a relatively developed markup language
that surfaces most of the highlighting features of Emacs. The library
is about 700 LOC excluding the header.

So to me faceup.el is a way to save and check full snapshots of syntax
highlighting. This is an *extremely* useful tool for tweaking an
already existing complicated highlighting system.

ert-font-lock.el is the simpler of the two (maybe 200 LOC). It
introduces a way to non-intrusively say something: "check that the
face above is right", and that's about it. The other benefit is that
it's modelled on Tree-sitter unit tests which makes porting already
existing TS grammar highlighting unit tests trivial.

So instead of snapshot-oriented testing this becomes closer to the
original idea of unit tests: adding small tests incrementally.

-- 
Regards,

Vladimir Kazanov



reply via email to

[Prev in Thread] Current Thread [Next in Thread]