]> git.eshelyaron.com Git - emacs.git/commit
ert-x: Move window selection logic to its own macro
authorRichard Hansen <rhansen@rhansen.org>
Sat, 17 Dec 2022 23:51:33 +0000 (18:51 -0500)
committerEli Zaretskii <eliz@gnu.org>
Sat, 24 Dec 2022 07:14:23 +0000 (09:14 +0200)
commit286c48137f69fa96b80d197da90c69a42df604a3
tree424c7049a3b32a421b755230d40d3a0d19424f01
parent823c49cea851158bc4db5ab133ecd9bf3d0791d7
ert-x: Move window selection logic to its own macro

* lisp/emacs-lisp/ert-x.el (ert-with-buffer-selected): New macro to
temporarily display a buffer in a selected window and evaluate a body.
(ert-with-test-buffer-selected): Use the new macro.
* test/lisp/whitespace-tests.el
(ert-test-with-buffer-selected/current)
(ert-test-with-buffer-selected/selected)
(ert-test-with-buffer-selected/nil-buffer)
(ert-test-with-buffer-selected/modification-hooks)
(ert-test-with-buffer-selected/read-only)
(ert-test-with-buffer-selected/return-value): Add tests.
(Bug#60189)
lisp/emacs-lisp/ert-x.el
test/lisp/emacs-lisp/ert-x-tests.el