summaryrefslogtreecommitdiff
path: root/test/lisp/textmodes/fill-tests.el
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2021-11-11 00:39:53 +0900
committerYuuki Harano <masm+github@masm11.me>2021-11-11 00:39:53 +0900
commit4dd1f56f29fc598a8339a345c2f8945250600602 (patch)
treeaf341efedffe027e533b1bcc0dbf270532e48285 /test/lisp/textmodes/fill-tests.el
parent4c49ec7f865bdad1629d2f125f71f4e506b258f2 (diff)
parent810fa21d26453f898de9747ece7205dfe6de9d08 (diff)
downloademacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.gz
emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.bz2
emacs-4dd1f56f29fc598a8339a345c2f8945250600602.zip
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'test/lisp/textmodes/fill-tests.el')
-rw-r--r--test/lisp/textmodes/fill-tests.el26
1 files changed, 24 insertions, 2 deletions
diff --git a/test/lisp/textmodes/fill-tests.el b/test/lisp/textmodes/fill-tests.el
index a4c7f447b59..2a1195b87ea 100644
--- a/test/lisp/textmodes/fill-tests.el
+++ b/test/lisp/textmodes/fill-tests.el
@@ -54,7 +54,7 @@
(beg (line-beginning-position))
(end (line-end-position))
(fill-prefix (make-string (- pos beg) ?\s))
- ;; `fill-column' is too small to accomodate the current line
+ ;; `fill-column' is too small to accommodate the current line
(fill-column (- end beg 10)))
(fill-region-as-paragraph beg end nil nil pos))
(should (equal (buffer-string) string)))))
@@ -69,13 +69,35 @@
(beg (line-beginning-position))
(end (line-end-position))
(fill-prefix (make-string (- pos beg) ?\s))
- ;; `fill-column' is too small to accomodate the current line
+ ;; `fill-column' is too small to accommodate the current line
(fill-column (- end beg 10)))
(fill-region-as-paragraph beg end nil nil pos))
(should (equal
(buffer-string)
"aaa = baaaaaaaa aaaaaaaaaa\n aaaaaaaaaa\n")))))
+(ert-deftest test-fill-end-period ()
+ (should
+ (equal
+ (with-temp-buffer
+ (text-mode)
+ (auto-fill-mode)
+ (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eius.")
+ (self-insert-command 1 ?\s)
+ (buffer-string))
+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eius. "))
+ (should
+ (equal
+ (with-temp-buffer
+ (text-mode)
+ (auto-fill-mode)
+ (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eius.Foo")
+ (forward-char -3)
+ (self-insert-command 1 ?\s)
+ (buffer-string))
+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
+eius. Foo")))
+
(provide 'fill-tests)
;;; fill-tests.el ends here