diff options
| author | Lars Ingebrigtsen | 2019-08-15 18:00:08 -0700 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-08-15 18:00:16 -0700 |
| commit | ab8a96977f6fc91d9a6ba4fe8a2a959c0525e339 (patch) | |
| tree | 1459a869b914210bba0b4e5800c3fc8a5b9ee109 /test | |
| parent | 1ee0192b792124663a0a40a729dd83c047d21535 (diff) | |
| download | emacs-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')
| -rw-r--r-- | test/lisp/mail/flow-fill-tests.el | 16 |
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 |