; ert-x: Add test for buffer read-only state

This test should have been included with commit
29b7d74000.
* test/lisp/emacs-lisp/ert-x-tests.el
(ert-test-with-test-buffer-selected/read-only): New test.
(Bug#60189)
This commit is contained in:
Richard Hansen 2022-12-17 18:26:33 -05:00 committed by Eli Zaretskii
parent 0e39ad6fa5
commit 38c6abe4d0

View file

@ -90,6 +90,11 @@
(ert-with-test-buffer-selected ()
(should (null inhibit-modification-hooks))))
(ert-deftest ert-test-with-test-buffer-selected/read-only ()
(ert-with-test-buffer-selected ()
(should (null inhibit-read-only))
(should (null buffer-read-only))))
(ert-deftest ert-test-with-test-buffer-selected/return-value ()
(should (equal (ert-with-test-buffer-selected () "foo") "foo")))