diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-15 23:21:16 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-15 23:21:16 -0500 |
| commit | 37f00dcbe5b400a968f63c4a27664ff8eee6030a (patch) | |
| tree | 36fcaf2cbb2105e777783f20501f295dbe923c4c /tests/test-custom-comments-comment-heavy-box.el | |
| parent | b53375c12c46f7020feae0c6274770ef2e31ebbb (diff) | |
| download | dotemacs-37f00dcbe5b400a968f63c4a27664ff8eee6030a.tar.gz dotemacs-37f00dcbe5b400a968f63c4a27664ff8eee6030a.zip | |
fix(custom-comments): heavy-box interiors are valid comments
The heavy-box empty and text lines began with a bare decoration char, so in line-comment languages (elisp, Python) C-; C h injected syntax-breaking lines. Prefix the interiors with the comment char and suffix them like cj/--comment-box does. Add the missing min-length guard so small or negative widths error cleanly instead of failing inside make-string. Updated the two characterization assertions to the corrected output.
Diffstat (limited to 'tests/test-custom-comments-comment-heavy-box.el')
| -rw-r--r-- | tests/test-custom-comments-comment-heavy-box.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-custom-comments-comment-heavy-box.el b/tests/test-custom-comments-comment-heavy-box.el index 94d4aaa5f..8acb9ff0b 100644 --- a/tests/test-custom-comments-comment-heavy-box.el +++ b/tests/test-custom-comments-comment-heavy-box.el @@ -64,8 +64,8 @@ Returns the buffer string for assertions." (should (string-match-p "^;; \\*" result)) ;; Middle line should contain centered text (should (string-match-p "Section Header" result)) - ;; Should have side borders - (should (string-match-p "^\\*.*\\*$" result)))) + ;; Interior side-border lines carry the comment prefix/suffix (not a bare *) + (should (string-match-p "^;; \\*.*\\* ;;$" result)))) (ert-deftest test-heavy-box-elisp-custom-decoration () "Should use custom decoration character." @@ -83,8 +83,8 @@ Returns the buffer string for assertions." (let ((result (test-heavy-box-at-column 0 ";;" "" "*" "" 70))) ;; Should still generate 5 lines (should (= 5 (length (split-string result "\n" t)))) - ;; Middle line should just have side borders and spaces - (should (string-match-p "^\\*.*\\*$" result)))) + ;; Middle line should just have side borders and spaces, comment-prefixed + (should (string-match-p "^;; \\*.*\\* ;;$" result)))) (ert-deftest test-heavy-box-elisp-at-column-0 () "Should work at column 0." |
