I would like to unit test my font-face keyword rules against some source code data sets.
It sounds like it should be quite easy: open the source file, enable the mode, force fontification, dump out the properties to a file and then compare. However, it is only possible (AFAICT) to
font-lock-fontify-buffer which has an ambiguous region... it may just be the visible region.
Is there a way to force fontification of every single character in the buffer, even when it is too large to view? Or are the docs just ambiguous, but it actually does what I want?
The ideal situation would be if somebody has already written a test framework for this, in which case, please let me know!
Maybe I could hack it with a custom
font-lock-fontify-region-function to select the entire buffer just for the test, but that limits my ability to test user interactions.