aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-01-26 16:17:49 +0100
committerLars Ingebrigtsen2022-01-26 16:20:05 +0100
commitc9524819eaf4e561a184b04dfca7e42970dc8809 (patch)
tree9aca5d7f6cad95f8fe3c6a67aeedb24d9cf78b4a /test
parent6075ea0b79922765df29ac148ac3a1fbb236ed94 (diff)
downloademacs-c9524819eaf4e561a184b04dfca7e42970dc8809.tar.gz
emacs-c9524819eaf4e561a184b04dfca7e42970dc8809.zip
Partially revert a fill-region-as-paragraph regression
* lisp/textmodes/fill.el (fill-region-as-paragraph): Revert e186af261 (bug#53537), because it leads to regressions. (But leave tests in place.)
Diffstat (limited to 'test')
-rw-r--r--test/lisp/textmodes/fill-tests.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/lisp/textmodes/fill-tests.el b/test/lisp/textmodes/fill-tests.el
index 39e5dd3d26c..8b9f144dfff 100644
--- a/test/lisp/textmodes/fill-tests.el
+++ b/test/lisp/textmodes/fill-tests.el
@@ -45,6 +45,8 @@
45 (should (string= (buffer-string) "Abc\nd efg\n(h ijk).")))) 45 (should (string= (buffer-string) "Abc\nd efg\n(h ijk)."))))
46 46
47(ert-deftest fill-test-unbreakable-paragraph () 47(ert-deftest fill-test-unbreakable-paragraph ()
48 ;; See bug#45720 and bug#53537.
49 :expected-result :failed
48 (with-temp-buffer 50 (with-temp-buffer
49 (let ((string "aaa = baaaaaaaaaaaaaaaaaaaaaaaaaaaa\n")) 51 (let ((string "aaa = baaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"))
50 (insert string) 52 (insert string)
@@ -76,6 +78,27 @@
76 (buffer-string) 78 (buffer-string)
77 "aaa = baaaaaaaa aaaaaaaaaa\n aaaaaaaaaa\n"))))) 79 "aaa = baaaaaaaa aaaaaaaaaa\n aaaaaaaaaa\n")))))
78 80
81(ert-deftest test-fill-haskell ()
82 (should
83 (equal
84 (with-temp-buffer
85 (asm-mode)
86 (dolist (line '(" ;; a b c"
87 " ;; d e f"
88 " ;; x y z"
89 " ;; w"))
90 (insert line "\n"))
91 (goto-char (point-min))
92 (end-of-line)
93 (setf fill-column 10)
94 (fill-paragraph nil)
95 (buffer-string))
96 " ;; a b c
97 ;; d e f
98 ;; x y z
99 ;; w
100")))
101
79(provide 'fill-tests) 102(provide 'fill-tests)
80 103
81;;; fill-tests.el ends here 104;;; fill-tests.el ends here