From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Anders Lindgren Newsgroups: gmane.emacs.devel Subject: New package, faceup, for font-lock regression testing Date: Thu, 26 Oct 2017 21:33:42 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114e2a62f8b6eb055c783f0d" X-Trace: blaine.gmane.org 1509046449 20957 195.159.176.226 (26 Oct 2017 19:34:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Oct 2017 19:34:09 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 26 21:33:57 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7nuY-0003XS-Kq for ged-emacs-devel@m.gmane.org; Thu, 26 Oct 2017 21:33:50 +0200 Original-Received: from localhost ([::1]:54358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7nuf-0002IR-US for ged-emacs-devel@m.gmane.org; Thu, 26 Oct 2017 15:33:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7nuT-0002Gy-04 for emacs-devel@gnu.org; Thu, 26 Oct 2017 15:33:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7nuR-0007q0-PS for emacs-devel@gnu.org; Thu, 26 Oct 2017 15:33:44 -0400 Original-Received: from mail-vk0-x229.google.com ([2607:f8b0:400c:c05::229]:47113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7nuR-0007pS-J8 for emacs-devel@gnu.org; Thu, 26 Oct 2017 15:33:43 -0400 Original-Received: by mail-vk0-x229.google.com with SMTP id j2so2850586vki.4 for ; Thu, 26 Oct 2017 12:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Za2SLrH86QFjYBeu0ttrql4s9/Cb4wOn6nR3Gn2TAS0=; b=c2qzX3mZAitHSJIy3ydMnMgH2r7F8SARYtnY2pEOYT00pOCgn9g511DqebTWdhjO42 J8y2vWteeMLsfi3/VIASnjYRDE85nu20c8Gs9foz6zyBWL9Ado1ixJvvS90F9JzO876V 35aB/wYc+V80nAKoFR24RQpEiWxRDvr+f07a+3PBtHwyE7S+pi5JjfVtQKEpgLEyUdK5 3fOGNSHzU4WZGtcBLjWFHVgyFwcDdgJPv7gtjsCyvh3f4ohFakd50Ns9Itahe6nHEHkO wiC1rrQ9fSz03dhqoe/FmrH2nN5fbG1+3jA5WjteCZd9GUwBRG4+VYrKKI1DJhrPZ6Sc o90Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Za2SLrH86QFjYBeu0ttrql4s9/Cb4wOn6nR3Gn2TAS0=; b=bwhSQJXIkcdQDZlfL4he4SXmKrZCXXE9Ecd/8aLsMjui50yIke17dBSx88x88MPjGr xGdCH/lya2iEW4MkofPN3yA9uTVKnpoD15E4HVPBQu3DnEeMJfYrrY6coeJ4RconVEKp VdfXjeKIV83hKDxZIO5fXykUSwpIXnRo7/l5SD9DBBMymiLd0nWd+diciUMJ77z+i9Mq lTshWCJ8fHnAzArSjo+OVEznp8NRXmDfpsZ/2j+mMr3f4bss9AgZ9u8iDJAxg8dU9972 w1ocBHcEc7hLZ0oBzQkfJmO8F0PumRDd9n41Z4vlxh496RY5ybOwKutA9FmZvUaAzlQS 0pTA== X-Gm-Message-State: AMCzsaXzlIihdj6/vHin83rCpyUueWUp2BilnwWw0XMTmLRuJ0IxaSu3 zz+BqzBKIeZph2NIfI7lGzT3JJi10jNAT3NUfhnlAQ== X-Google-Smtp-Source: ABhQp+THmy4KBhnm6/Tx8pk0HIGwETBnbbxzZprIez3zfvRw5hZeNCjl7m2BwJECZCMgg8HW0Eo3So7bwR3olkMCDIg= X-Received: by 10.31.92.11 with SMTP id q11mr4489375vkb.10.1509046422647; Thu, 26 Oct 2017 12:33:42 -0700 (PDT) Original-Received: by 10.31.45.1 with HTTP; Thu, 26 Oct 2017 12:33:42 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400c:c05::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219788 Archived-At: --001a114e2a62f8b6eb055c783f0d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: =C2=ABk:this=C2=BB 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 --001a114e2a62f8b6eb055c783f0d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

I just added a new modul= e to Emacs, "faceup". The main purpose of this
module i= s for regression testing of font-lock keywords. It is designed
to= work with the built-in ERT regression test system. It has been
a= vailable 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:

=C2=A0 =C2=A0 =C2=ABk:this=C2=BB is a keyword
<= br>
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 mark= up
format to save a source file, with highlighting. The regressio= n test
can later compare this with the current highlighting.

The system scales well. In some of my projects I'v= e 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 pos= sible
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:





<= /div>

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


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

=C2=A0 =C2=A0 -- Anders Lindgren

--001a114e2a62f8b6eb055c783f0d--