]> git.eshelyaron.com Git - emacs.git/commit
Support selecting buffer in ert-with-test-buffer
authorStefan Kangas <stefankangas@gmail.com>
Mon, 24 Feb 2025 17:54:23 +0000 (18:54 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 26 Feb 2025 09:35:45 +0000 (10:35 +0100)
commit6241ed85267f514445162d7713a3b67fca1d6228
treee640260c271e2ad174e813df38b938daa6084ffd
parenta7fabe1c983519adc93c68fe71f430f488be0098
Support selecting buffer in ert-with-test-buffer

* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer): Add new keyword
argument :selected to make the buffer current and selected.
(ert-with-test-buffer-selected): Make obsolete and redefine in
terms of ert-with-test-buffer.

* doc/misc/ert.texi (Helper Functions): Document above new
:selected keyword argument, and remove documentation of
ert-with-test-buffer-selected.

* test/lisp/emacs-lisp/ert-x-tests.el
(ert-test-with-test-buffer-selected/selected)
(ert-test-with-test-buffer-selected/modification-hooks)
(ert-test-with-test-buffer-selected/read-only)
(ert-test-with-test-buffer-selected/return-value)
(ert-test-with-test-buffer-selected/buffer-name):
* test/lisp/progmodes/hideshow-tests.el
(hideshow-tests-with-temp-buffer-selected):
* test/lisp/simple-tests.el (kill-whole-line-invisible)
(kill-whole-line-read-only, kill-whole-line-after-other-kill)
(kill-whole-line-buffer-boundaries)
(kill-whole-line-line-boundaries):
* test/lisp/whitespace-tests.el
(whitespace-tests--with-test-buffer, whitespace-tests--global): Use
ert-with-test-buffer instead of ert-with-test-buffer-selected.

(cherry picked from commit 13ca18e1f79f9c02ac46735b58bc5126f77f0a77)
doc/misc/ert.texi
lisp/emacs-lisp/ert-x.el
test/lisp/emacs-lisp/ert-x-tests.el
test/lisp/progmodes/hideshow-tests.el
test/lisp/simple-tests.el
test/lisp/whitespace-tests.el