adding tests to redisplay
kehoea at parhasard.net
Fri Mar 27 12:55:52 EDT 2009
Ar an séú lá is fiche de mí Márta, scríobh Ram Bhamidipaty:
> [...] The goal of this kind of regression suite would be to create enough
> tests that can be used as a way of validating any future changes to the
> redisplay code.
> My question: Is there any C code in xemacs that creates simple Lisp structures
> and returns them to Lisp? Basically I want to create a function that would
> turn a struct display_line into a Lisp list - is there some code that I could
> look at to get an idea on how to do this?
rangetab.c and elhash.c does something vaguely like this. As Stephen
commented, there is lots of code for creating Lisp structures that is
available from C, but I’m not certain that’s what you mean.
In your position, I would add functions to check the integrity of the
various structures I was interested in to tests.c, and call those functions
from the Lisp test code that created a particular redisplay situation.
(Unfortunately, it seems you might have to fight with the -batch-handling
code to allow tests run with -batch to create GUI frames; at least this
seems true on Windows, and I get the following on FreeBSD:
./xemacs-21.5-b28 -batch -eval "(make-frame-on-device 'tty nil)"
Fatal error: assertion failed, file event-Xt.c, line 2267, !filedesc_to_what_closure[fd]
Fatal error (6).)
I wouldn’t try to expose struct display_line or anything of the sort.
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
More information about the XEmacs-Beta