[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Testing fontification, indentation, and buffer manipulation
From: |
Daniele Nicolodi |
Subject: |
Re: Testing fontification, indentation, and buffer manipulation |
Date: |
Sat, 19 Jan 2019 08:07:13 -0700 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 15/01/2019 11:45, Yuri Khan wrote:
> 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
Thanks Yuri, this is very helpful.
Cheers,
Dan
- Testing fontification, indentation, and buffer manipulation, Daniele Nicolodi, 2019/01/15
- Re: Testing fontification, indentation, and buffer manipulation, Yuri Khan, 2019/01/15
- Re: Testing fontification, indentation, and buffer manipulation,
Daniele Nicolodi <=
- 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
Re: Testing fontification, indentation, and buffer manipulation, Helmut Eller, 2019/01/16