unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Testing fontification, indentation, and buffer manipulation
Date: Wed, 16 Jan 2019 08:58:18 +0100	[thread overview]
Message-ID: <m2ef9dt4o5.fsf@gmail.com> (raw)
In-Reply-To: 7803c5de-e139-01ed-e9e3-98abb875782b@grinta.net

On Tue, Jan 15 2019, Daniele Nicolodi wrote:

> I am hacking on beancount-mode (a mode to edit Beancount ledger files)
> and I would like to write some automated tests to check the
> functionality of the minor mode.  I found ERT, but it seems that it does
> not offer any facility to easily test fontification, indentation, or
> buffer manipulation in general.
>
> Is there any facility that would help in writing such tests?

Something that I found useful was using somewhat exotic characters to
mark positions.  E.g.

  (forth-assert-face ": →frob ;" font-lock-function-name-face)

tests that the face after the → is font-lock-function-name-face.

Or

  (forth-assert-forward-sexp " ¹if drop exit else 1+ then² bar ")

tests that if forward-sexp is called at the position marked with ¹ it
will move to ².

Helmut




      parent reply	other threads:[~2019-01-16  7:58 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 15:43 Testing fontification, indentation, and buffer manipulation Daniele Nicolodi
2019-01-15 18:45 ` Yuri Khan
2019-01-19 15:07   ` Daniele Nicolodi
2019-01-21 10:45     ` Jostein Kjønigsen
2019-01-21 20:57       ` Richard Stallman
2019-01-23 23:22         ` Phillip Lord
2019-01-24  2:09           ` Stefan Monnier
2019-01-24 10:29             ` Phillip Lord
2019-01-24 14:48               ` Ted Zlatanov
2019-01-26  0:46               ` Stefan Monnier
2019-01-26  7:17                 ` Eli Zaretskii
2019-01-26 10:41                 ` Phillip Lord
2019-02-20 19:59                   ` Core ELPA was: " Phillip Lord
2019-02-27 23:05                     ` Stefan Monnier
2019-03-01 15:55                       ` Phillip Lord
2019-03-01 17:25                         ` Stefan Monnier
2019-03-01 21:39                           ` Phillip Lord
2019-03-01 22:07                             ` Stefan Monnier
2019-03-02 11:14                               ` Phillip Lord
2019-03-03  3:23                                 ` Stefan Monnier
2019-03-03 18:06                                   ` Phillip Lord
2019-03-08  2:51                                     ` Stefan Monnier
2019-03-10 11:45                                       ` Phillip Lord
2019-03-10 18:02                                         ` Stefan Monnier
2019-03-11 22:46                                           ` Phillip Lord
2019-03-12  1:11                                             ` Stefan Monnier
2019-03-12 23:02                                               ` Phillip Lord
2019-03-13 19:05                                                 ` Stefan Monnier
2019-03-13 22:41                                                   ` Phillip Lord
2019-03-02  3:36                           ` Richard Stallman
2019-03-02 11:21                             ` Phillip Lord
2019-03-03  3:00                               ` Richard Stallman
2019-03-03 17:52                                 ` Phillip Lord
2019-03-04  3:27                                   ` Richard Stallman
2019-03-10 11:27                                     ` Phillip Lord
2019-03-11  1:23                                       ` Richard Stallman
2019-03-11 22:08                                         ` Phillip Lord
2019-03-12  3:38                                           ` Richard Stallman
2019-03-12 15:42                                             ` Eli Zaretskii
2019-03-12 15:52                                               ` Robert Pluim
2019-03-12 17:25                                                 ` Eli Zaretskii
2019-03-12 22:49                                                   ` Phillip Lord
2019-03-12 22:48                                                 ` Phillip Lord
2019-03-12 18:37                                               ` XEmacs packages (was: Core ELPA was: Testing fontification, indentation, and buffer manipulation) Stefan Monnier
2019-03-13  3:32                                               ` Core ELPA was: Testing fontification, indentation, and buffer manipulation Richard Stallman
2019-01-16  7:58 ` Helmut Eller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ef9dt4o5.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).