summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/ert-x-tests.el
diff options
context:
space:
mode:
authorRichard Hansen <rhansen@rhansen.org>2022-12-17 18:26:33 -0500
committerEli Zaretskii <eliz@gnu.org>2022-12-24 09:10:36 +0200
commit38c6abe4d0b6bc6b5dfc32ab7b9b5095adf82da0 (patch)
tree09beeac5f0e066cce62a7bba7d9980facb444485 /test/lisp/emacs-lisp/ert-x-tests.el
parent0e39ad6fa56d50b4710157f0b6f396e492da0dfb (diff)
downloademacs-38c6abe4d0b6bc6b5dfc32ab7b9b5095adf82da0.tar.gz
emacs-38c6abe4d0b6bc6b5dfc32ab7b9b5095adf82da0.tar.bz2
emacs-38c6abe4d0b6bc6b5dfc32ab7b9b5095adf82da0.zip
; ert-x: Add test for buffer read-only state
This test should have been included with commit 29b7d740006fe2190a729bd1c30ccab9356cee36. * test/lisp/emacs-lisp/ert-x-tests.el (ert-test-with-test-buffer-selected/read-only): New test. (Bug#60189)
Diffstat (limited to 'test/lisp/emacs-lisp/ert-x-tests.el')
-rw-r--r--test/lisp/emacs-lisp/ert-x-tests.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/ert-x-tests.el b/test/lisp/emacs-lisp/ert-x-tests.el
index 63e7cd7608f..f14d54cd9f7 100644
--- a/test/lisp/emacs-lisp/ert-x-tests.el
+++ b/test/lisp/emacs-lisp/ert-x-tests.el
@@ -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")))