[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 679501e 056/486: Cover all cases for padding in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 679501e 056/486: Cover all cases for padding in paragraph fills as intended |
Date: |
Sat, 7 Aug 2021 09:24:47 -0400 (EDT) |
branch: elpa/rust-mode
commit 679501e9aba4f3672636072795d0837aabd50d02
Author: Micah Chalmer <micah@micahchalmer.net>
Commit: Micah Chalmer <micah@micahchalmer.net>
Cover all cases for padding in paragraph fills as intended
---
rust-mode-tests.el | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index ac5b1b1..4bfdee5 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -51,20 +51,25 @@ Also, the result should be the same regardless of whether
the code is at the beg
(padding-len (length padding)))
(loop
for pad-at-beginning from 0 to 1
- for pad-at-end from 0 to 1
- with padding-beginning = (if (= 0 pad-at-beginning) "" padding)
- with padding-end = (if (= 0 pad-at-end) "" padding)
- with padding-adjust = (* padding-len pad-at-beginning)
- with padding-beginning = (if (= 0 pad-at-beginning) "" padding)
- with padding-end = (if (= 0 pad-at-end) "" padding)
- for pos from (if (= 1 start-pos) 1 (+ padding-adjust start-pos)) to (+
end-pos padding-adjust)
- do (rust-test-manip-code
- (concat padding-beginning unfilled padding-end)
- pos
- (lambda ()
- (let ((fill-column rust-test-fill-column))
- (fill-paragraph)))
- (concat padding-beginning expected padding-end)))))
+ do (loop for pad-at-end from 0 to 1
+ with padding-beginning = (if (= 0 pad-at-beginning) "" padding)
+ with padding-end = (if (= 0 pad-at-end) "" padding)
+ with padding-adjust = (* padding-len pad-at-beginning)
+ with padding-beginning = (if (= 0 pad-at-beginning) "" padding)
+ with padding-end = (if (= 0 pad-at-end) "" padding)
+ ;; If we're adding space to the beginning, and our start position
+ ;; is at the very beginning, we want to test within the added space.
+ ;; Otherwise adjust the start and end for the beginning padding.
+ with start-pos = (if (= 1 start-pos) 1 (+ padding-adjust start-pos))
+ with end-pos = (+ end-pos padding-adjust)
+ do (loop for pos from start-pos to end-pos
+ do (rust-test-manip-code
+ (concat padding-beginning unfilled padding-end)
+ pos
+ (lambda ()
+ (let ((fill-column rust-test-fill-column))
+ (fill-paragraph)))
+ (concat padding-beginning expected padding-end)))))))
(ert-deftest fill-paragraph-top-level-multi-line-style-doc-comment-second-line
()
(test-fill-paragraph
- [nongnu] elpa/rust-mode cfb4408 354/486: Merge pull request #258 from sebastiencs/master, (continued)
- [nongnu] elpa/rust-mode cfb4408 354/486: Merge pull request #258 from sebastiencs/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b861aa9 358/486: Fixed indent when ? operator is used in chained method calls, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 31b8453 361/486: update to include line number and column information, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 3254297 366/486: Bump version, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d3a7025 377/486: Merge pull request #292 from mookid/imenu-impl, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode dd231ed 383/486: Avoid signaling "Beginning of buffer" in rust-lookng-back-macro, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b7237b0 405/486: Add rust-format-diff-buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 10ba29e 406/486: Silence byte-compiler, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c8217a3 425/486: Fix rust-insert-dbg for emacs-version < 25. (#339), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0e25008 043/486: rust-mode: Default rust-indent-offset to 4, not default-tab-width, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 679501e 056/486: Cover all cases for padding in paragraph fills as intended,
ELPA Syncer <=
- [nongnu] elpa/rust-mode bee96e8 067/486: Fix emacs indentation of multi-line match patterns, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9d8dff8 077/486: Use defvar for rust-top-item-beg-re instead, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e2cd79b 084/486: auto merge of #14818 : tomjakubowski/rust/emacs-attributes-key-value, r=pnkfelix, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9672625 066/486: Added more scripts to tidy check, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 7cb68f7 088/486: Add new keywords (particularly `where` & `virtual`) to editor modes., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode efbc810 089/486: Replaced some TODO by FIXME, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 13c7e25 105/486: Ignore byte-compiled files, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 3878cc6 107/486: Allow user to override which emacs is used in run_rust_emacs_tests.sh, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6b57bbf 117/486: Make features (and their tests) work on emacs 23, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 4d633fc 125/486: Merge pull request #32 from MicahChalmer/raw-string-handling, ELPA Syncer, 2021/08/07