From e5685497111ef71e57948f023f8d2a03647c3d69 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 30 Dec 2024 14:26:46 +0900 Subject: [PATCH 2/3] test/lisp: Add a test checking docstring boundaries when filling. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-fill-paragraph-docstring-boundaries): New test. --- test/lisp/emacs-lisp/lisp-mode-tests.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index 9a2b1ea4654..eac2763c595 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el @@ -311,6 +311,25 @@ lisp-indent-defun ;;; Filling +(ert-deftest lisp-fill-paragraph-docstring-boundaries () + "Test bug#28937, ensuring filling the docstring filled is properly +bounded." + (with-temp-buffer + (insert "\ +(defun test () + \"This is a test docstring. +Here is some more text.\" + 1 + 2 + 3 + 4 + 5)") + (let ((correct (buffer-string))) + (emacs-lisp-mode) + (search-backward "This is a test docstring") + (fill-paragraph) ;function under test + (should (equal (buffer-string) correct))))) + (ert-deftest lisp-fill-paragraph-respects-fill-column () "Test bug#56197 -- more specifically, validate that a leading indentation for a string is preserved in the filled string." -- 2.46.0