]> git.eshelyaron.com Git - emacs.git/commit
Improve robustness of server.el tests
authorJim Porter <jporterbugs@gmail.com>
Fri, 25 Nov 2022 19:13:06 +0000 (11:13 -0800)
committerJim Porter <jporterbugs@gmail.com>
Sat, 26 Nov 2022 21:40:33 +0000 (13:40 -0800)
commit14d54212ea46dbd8c950c9852318597e0e47908d
tree59dc3ec997725f0887c077b9d6b4463ea9492741
parenteb713a8fccc7f0512cfdbd5c520d4c856746a968
Improve robustness of server.el tests

* lisp/emacs-lisp/ert.el (ert--insert-infos): Allow 'message' to be a
function that is called when inserting the info.
(ert-info): Update docstring to describe using a function for
MESSAGE-FORM.

* lisp/server.el (server-start): Log when the server is starting.

* test/lisp/server-tests.el (server-tests/can-create-frames-p): New
constant.  Use it to skip tests that need to create frames.
(server-tests/start-emacsclient): Rename to...
(server-tests/start-client): ... this, and set the process's buffer.
(server-tests/with-server): Put the server file in a temporary
directory so we don't conflict with real Emacs servers.
(server-tests/with-client): New macro...
(server-tests/server-start/stop-prompt-with-client)
(server-tests/emacsclient/server-edit)
(server-tests/emacsclient/create-frame)
(server-tests/emacsclient/create-frame): ... use it.
(server-tests/server-start/stop-prompt-with-client): Simplify.
lisp/emacs-lisp/ert.el
lisp/server.el
test/lisp/server-tests.el