File tree 2 files changed +31
-1
lines changed
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.
196
196
*very very very long string
197
197
*/" ))
198
198
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
+
199
228
(defun test-auto-fill (initial position inserted expected )
200
229
(rust-test-manip-code
201
230
initial
Original file line number Diff line number Diff line change 300
300
(let
301
301
((fill-paragraph-function
302
302
(if (not (eq fill-paragraph-function 'rust-fill-paragraph ))
303
- fill-paragraph-function)))
303
+ fill-paragraph-function))
304
+ (fill-paragraph-handle-comment t ))
304
305
(apply 'fill-paragraph args)
305
306
t ))))))
306
307
You can’t perform that action at this time.
0 commit comments