%
% "))))
+(ert-deftest auto-fill-pldoc-comments ()
+ "Test writing PlDoc comments with `auto-fill-mode' enable."
+ (with-temp-buffer
+ (sweeprolog-mode)
+ (auto-fill-mode)
+ (seq-do (lambda (c)
+ (let ((last-command-event c))
+ (call-interactively #'self-insert-command)))
+ "
+%! foobar is det.
+%
+% Nam vestibulum accumsan nisl. Donec pretium posuere tellus. Aenean in sem ac leo mollis blandit. Nam a sapien. Proin quam nisl, tincidunt et, mattis eget, convallis nec, purus.
+"
+ )
+ (should (string= (buffer-string)
+ "
+%! foobar is det.
+%
+% Nam vestibulum accumsan nisl. Donec pretium posuere tellus.
+% Aenean in sem ac leo mollis blandit. Nam a sapien. Proin quam
+% nisl, tincidunt et, mattis eget, convallis nec, purus.
+"))))
+
(ert-deftest electric-layout ()
"Test `sweeprolog-electric-layout-mode'."
(with-temp-buffer
(setq-local forward-sexp-function #'sweeprolog-forward-sexp-function)
(setq-local syntax-propertize-function #'sweeprolog-syntax-propertize)
(setq-local indent-line-function #'sweeprolog-indent-line)
+ (setq-local adaptive-fill-regexp "[ \t]*")
+ (setq-local fill-indent-according-to-mode t)
(setq-local font-lock-defaults
'(nil
nil