diff options
| author | Deneb Meketa | 2021-05-27 01:21:59 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-05-27 01:21:59 +0200 |
| commit | 7f11dea66298c2c9aeccab2b542ee8e73346f09f (patch) | |
| tree | e21f734f54f16669b2339da6b08db55252f94c11 /test/lisp/progmodes/python-tests.el | |
| parent | 0dfe193ec42160bfaa30933c5ebfa7ae91cde88b (diff) | |
| download | emacs-7f11dea66298c2c9aeccab2b542ee8e73346f09f.tar.gz emacs-7f11dea66298c2c9aeccab2b542ee8e73346f09f.zip | |
Fix filling of overlong first lines in Python doc strings
* lisp/progmodes/python.el (python-fill-string): Fill overlong
first lines correctly (bug#20860).
Copyright-paperwork-exempt: yes
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 3e653cb568a..1af579bb7a4 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -5432,6 +5432,30 @@ buffer with overlapping strings." | |||
| 5432 | (run-python nil nil 'show) | 5432 | (run-python nil nil 'show) |
| 5433 | (should (eq buffer (current-buffer))))) | 5433 | (should (eq buffer (current-buffer))))) |
| 5434 | 5434 | ||
| 5435 | (ert-deftest python-tests--fill-long-first-line () | ||
| 5436 | (should | ||
| 5437 | (equal | ||
| 5438 | (with-temp-buffer | ||
| 5439 | (insert "def asdf(): | ||
| 5440 | \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123 SHOULDBEWRAPPED 123 123 123 123 | ||
| 5441 | |||
| 5442 | \"\"\" | ||
| 5443 | a = 1 | ||
| 5444 | ") | ||
| 5445 | (python-mode) | ||
| 5446 | (goto-char (point-min)) | ||
| 5447 | (forward-line 1) | ||
| 5448 | (end-of-line) | ||
| 5449 | (fill-paragraph) | ||
| 5450 | (buffer-substring-no-properties (point-min) (point-max))) | ||
| 5451 | "def asdf(): | ||
| 5452 | \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123 | ||
| 5453 | SHOULDBEWRAPPED 123 123 123 123 | ||
| 5454 | |||
| 5455 | \"\"\" | ||
| 5456 | a = 1 | ||
| 5457 | "))) | ||
| 5458 | |||
| 5435 | (provide 'python-tests) | 5459 | (provide 'python-tests) |
| 5436 | 5460 | ||
| 5437 | ;; Local Variables: | 5461 | ;; Local Variables: |