File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,35 @@ This is some more text. Fee fie fo fum. Humpty dumpty sat on a wall.
196196 *very very very long string
197197 */" ))
198198
199+ (ert-deftest fill-paragraph-single-line-style-with-code-before ()
200+ (test-fill-paragraph
201+ " fn foo() { }
202+ /// This is my comment. This is more of my comment. This is even more."
203+ " fn foo() { }
204+ /// This is my comment. This is
205+ /// more of my comment. This is
206+ /// even more." 14 ))
207+
208+ (ert-deftest fill-paragraph-single-line-style-with-code-after ()
209+ (test-fill-paragraph
210+ " /// This is my comment. This is more of my comment. This is even more.
211+ fn foo() { }"
212+ " /// This is my comment. This is
213+ /// more of my comment. This is
214+ /// even more.
215+ fn foo() { }" 1 73 ))
216+
217+ (ert-deftest fill-paragraph-single-line-style-code-before-and-after ()
218+ (test-fill-paragraph
219+ " fn foo() { }
220+ /// This is my comment. This is more of my comment. This is even more.
221+ fn bar() { }"
222+ " fn foo() { }
223+ /// This is my comment. This is
224+ /// more of my comment. This is
225+ /// even more.
226+ fn bar() { }" 14 67 ))
227+
199228(defun test-auto-fill (initial position inserted expected )
200229 (rust-test-manip-code
201230 initial
Original file line number Diff line number Diff line change 300300 (let
301301 ((fill-paragraph-function
302302 (if (not (eq fill-paragraph-function 'rust-fill-paragraph ))
303- fill-paragraph-function)))
303+ fill-paragraph-function))
304+ (fill-paragraph-handle-comment t ))
304305 (apply 'fill-paragraph args)
305306 t ))))))
306307
You can’t perform that action at this time.
0 commit comments