From: Richard Hansen Date: Sat, 17 Dec 2022 23:26:33 +0000 (-0500) Subject: ; ert-x: Add test for buffer read-only state X-Git-Tag: emacs-29.0.90~1037 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=38c6abe4d0b6bc6b5dfc32ab7b9b5095adf82da0;p=emacs.git ; 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) --- 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")))