aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-08-15 18:00:08 -0700
committerLars Ingebrigtsen2019-08-15 18:00:16 -0700
commitab8a96977f6fc91d9a6ba4fe8a2a959c0525e339 (patch)
tree1459a869b914210bba0b4e5800c3fc8a5b9ee109 /test/lisp
parent1ee0192b792124663a0a40a729dd83c047d21535 (diff)
downloademacs-ab8a96977f6fc91d9a6ba4fe8a2a959c0525e339.tar.gz
emacs-ab8a96977f6fc91d9a6ba4fe8a2a959c0525e339.zip
Reimplement the `fill-flowed' function to respect space stuffing
* lisp/mail/flow-fill.el (fill-flowed): Reimplement the function to respect space-stuffing (bug#17190). * test/lisp/mail/flow-fill-tests.el (fill-flow-tests-fill-flowed-stuffed): New test. (fill-flow-tests-fill-flowed-decode): Rename the test so that it actually runs.
Diffstat (limited to 'test/lisp')
-rw-r--r--test/lisp/mail/flow-fill-tests.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/lisp/mail/flow-fill-tests.el b/test/lisp/mail/flow-fill-tests.el
index a05950bb70a..2dd516b91d1 100644
--- a/test/lisp/mail/flow-fill-tests.el
+++ b/test/lisp/mail/flow-fill-tests.el
@@ -24,7 +24,7 @@
24(require 'ert) 24(require 'ert)
25(require 'flow-fill) 25(require 'flow-fill)
26 26
27(ert-deftest fill-flow-tests-fill-flowed-encode () 27(ert-deftest fill-flow-tests-fill-flowed-decode ()
28 (let ((input 28 (let ((input
29 (concat 29 (concat
30 "> Thou villainous ill-breeding spongy dizzy-eyed \n" 30 "> Thou villainous ill-breeding spongy dizzy-eyed \n"
@@ -53,6 +53,7 @@
53 (with-temp-buffer 53 (with-temp-buffer
54 (insert input) 54 (insert input)
55 (fill-flowed) 55 (fill-flowed)
56 (message "foo")
56 (should (equal (buffer-string) output))))) 57 (should (equal (buffer-string) output)))))
57 58
58(ert-deftest fill-flow-tests-fill-flowed-encode () 59(ert-deftest fill-flow-tests-fill-flowed-encode ()
@@ -88,5 +89,18 @@
88 (fill-flowed-encode) 89 (fill-flowed-encode)
89 (should (equal (buffer-string) output))))) 90 (should (equal (buffer-string) output)))))
90 91
92(ert-deftest fill-flow-tests-fill-flowed-stuffed ()
93 (let ((input
94 (concat
95 " > From space-stuffed with a \n"
96 "continuation.\n"))
97 (output
98 "> From space-stuffed with a continuation.\n")
99 (fill-flowed-display-column 69))
100 (with-temp-buffer
101 (insert input)
102 (fill-flowed)
103 (should (equal (buffer-string) output)))))
104
91(provide 'flow-fill-tests) 105(provide 'flow-fill-tests)
92;;; flow-fill-tests.el ends here 106;;; flow-fill-tests.el ends here