[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testing fontification, indentation, and buffer manipulation
From: |
Yuri Khan |
Subject: |
Re: Testing fontification, indentation, and buffer manipulation |
Date: |
Wed, 16 Jan 2019 01:45:07 +0700 |
On Tue, Jan 15, 2019 at 10:52 PM Daniele Nicolodi <address@hidden> 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?
You might want to look at ledger-mode tests. Its approach to
fontification testing is:
* Create a temporary buffer.
* Put test text into it.
* Harvest it back with fontification properties into a data structure.
* Test that this structure is equal to the golden output.
https://github.com/ledger/ledger-mode/blob/master/test/test-helper.el#L149
https://github.com/ledger/ledger-mode/blob/master/test/fontify-test.el
- Testing fontification, indentation, and buffer manipulation, Daniele Nicolodi, 2019/01/15
- Re: Testing fontification, indentation, and buffer manipulation,
Yuri Khan <=
- Re: Testing fontification, indentation, and buffer manipulation, Daniele Nicolodi, 2019/01/19
- Re: Testing fontification, indentation, and buffer manipulation, Jostein Kjønigsen, 2019/01/21
- Re: Testing fontification, indentation, and buffer manipulation, Richard Stallman, 2019/01/21
- Re: Testing fontification, indentation, and buffer manipulation, Phillip Lord, 2019/01/23
- Re: Testing fontification, indentation, and buffer manipulation, Stefan Monnier, 2019/01/23
- Re: Testing fontification, indentation, and buffer manipulation, Phillip Lord, 2019/01/24
- Re: Testing fontification, indentation, and buffer manipulation, Ted Zlatanov, 2019/01/24
- Re: Testing fontification, indentation, and buffer manipulation, Stefan Monnier, 2019/01/25
- Re: Testing fontification, indentation, and buffer manipulation, Eli Zaretskii, 2019/01/26
- Re: Testing fontification, indentation, and buffer manipulation, Phillip Lord, 2019/01/26