summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/python-tests.el
diff options
context:
space:
mode:
authorDeneb Meketa <deneb@pixar.com>2021-05-27 01:21:59 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-05-27 01:21:59 +0200
commit7f11dea66298c2c9aeccab2b542ee8e73346f09f (patch)
treee21f734f54f16669b2339da6b08db55252f94c11 /test/lisp/progmodes/python-tests.el
parent0dfe193ec42160bfaa30933c5ebfa7ae91cde88b (diff)
downloademacs-7f11dea66298c2c9aeccab2b542ee8e73346f09f.tar.gz
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.el24
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."
(run-python nil nil 'show)
(should (eq buffer (current-buffer)))))
+(ert-deftest python-tests--fill-long-first-line ()
+ (should
+ (equal
+ (with-temp-buffer
+ (insert "def asdf():
+ \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123 SHOULDBEWRAPPED 123 123 123 123
+
+ \"\"\"
+ a = 1
+")
+ (python-mode)
+ (goto-char (point-min))
+ (forward-line 1)
+ (end-of-line)
+ (fill-paragraph)
+ (buffer-substring-no-properties (point-min) (point-max)))
+ "def asdf():
+ \"\"\"123 123 123 123 123 123 123 123 123 123 123 123 123
+ SHOULDBEWRAPPED 123 123 123 123
+
+ \"\"\"
+ a = 1
+")))
+
(provide 'python-tests)
;; Local Variables: