diff options
| author | Noam Postavsky | 2020-04-04 12:28:23 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2020-04-04 20:08:02 -0400 |
| commit | f8607d3c03544afbe32c6bd324c287db305e569e (patch) | |
| tree | 8456e415656c1d90f90e05a3e634479181cdc544 /test | |
| parent | 7e78f0d1b26557b1af95c542cc95cff131c18ec8 (diff) | |
| download | emacs-f8607d3c03544afbe32c6bd324c287db305e569e.tar.gz emacs-f8607d3c03544afbe32c6bd324c287db305e569e.zip | |
Handle filling of indented ChangeLog function entries
* lisp/vc/log-edit.el (log-edit-fill-entry): Relax regexp a bit to
recognize function entries with leading blanks.
* test/lisp/vc/log-edit-tests.el: New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/vc/log-edit-tests.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/lisp/vc/log-edit-tests.el b/test/lisp/vc/log-edit-tests.el index bb3f6582325..86a40a97b19 100644 --- a/test/lisp/vc/log-edit-tests.el +++ b/test/lisp/vc/log-edit-tests.el | |||
| @@ -74,6 +74,31 @@ couple of sentences. Long enough to be | |||
| 74 | filled for several lines. | 74 | filled for several lines. |
| 75 | \(fun9): Etc.")))) | 75 | \(fun9): Etc.")))) |
| 76 | 76 | ||
| 77 | (ert-deftest log-edit-fill-entry-indented-func-entries () | ||
| 78 | ;; Indenting function entries is a typical mistake caused by using a | ||
| 79 | ;; misconfigured or non-ChangeLog specific fill function. | ||
| 80 | (with-temp-buffer | ||
| 81 | (insert "\ | ||
| 82 | * dir/file.ext (fun1): | ||
| 83 | (fun2): | ||
| 84 | (fun3): | ||
| 85 | * file2.txt (fun4): | ||
| 86 | (fun5): | ||
| 87 | (fun6): | ||
| 88 | (fun7): Some prose. | ||
| 89 | (fun8): A longer description of a complicated change.\ | ||
| 90 | Spread over a couple of sentences.\ | ||
| 91 | Long enough to be filled for several lines. | ||
| 92 | (fun9): Etc.") | ||
| 93 | (goto-char (point-min)) | ||
| 94 | (let ((fill-column 72)) (log-edit-fill-entry)) | ||
| 95 | (should (equal (buffer-string) "\ | ||
| 96 | * dir/file.ext (fun1, fun2, fun3): | ||
| 97 | * file2.txt (fun4, fun5, fun6, fun7): Some prose. | ||
| 98 | \(fun8): A longer description of a complicated change. Spread over a | ||
| 99 | couple of sentences. Long enough to be filled for several lines. | ||
| 100 | \(fun9): Etc.")))) | ||
| 101 | |||
| 77 | (ert-deftest log-edit-fill-entry-trailing-prose () | 102 | (ert-deftest log-edit-fill-entry-trailing-prose () |
| 78 | (with-temp-buffer | 103 | (with-temp-buffer |
| 79 | (insert "\ | 104 | (insert "\ |