emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 27.0.50: How can I test a buffer-local window-configuration-change-h


From: Eli Zaretskii
Subject: Re: 27.0.50: How can I test a buffer-local window-configuration-change-hook in batch mode?
Date: Fri, 25 Oct 2019 16:57:25 +0300

> From: Stefan Monnier <address@hidden>
> Cc: Phil Sainty <address@hidden>,  address@hidden
> Date: Fri, 25 Oct 2019 08:53:11 -0400
> 
> > Yes, but it it also is impossible to write a batch-mode test which
> > runs _any_ of the display-related hooks, because the only "correct"
> > way to do that is to trigger redisplay, and you cannot do that in
> > batch mode.  So you can only write partial tests for these hooks, by
> > invoking them directly from Lisp.
> 
> IIRC there are ways to run Emacs in "batch" yet make it "display" at the
> same time.  E.g. you can run it in a virtual X server, and I'm sure
> there are ways to do the same in "virtual terminal emulators".

Thanks.  However, unless these emulators are components of a
garden-variety system out there, using them for Emacs testing would
mean that only a few of us could ever run these tests.  E.g., if I
cannot run redisplay tests on any of my systems, my motivation for
writing such tests will be exactly zero.  It is much better/easier to
run the tests interactively.

Also, using a display emulator for such testing would most probably
mean we cannot verify the correctness of the resulting display in some
automated way, as we do with ert facilities.  If so, the utility of
such emulators for testing Emacs display code will be rather low: it
will only be useful for making sure Emacs doesn't crash in some cases,
and allow testing of some display-related hooks (the issue that
triggered this thread), and maybe also features for which we can
produce indirect evidence using existing Lisp APIs, like make sure a
window or a stretch of text has the expected dimensions under some
conditions.

Bottom line: I think using these emulators is only a very partial
solution to being able to test our display code.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]