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 | 28004401fd95db7ab3038e574a2bad3f3a22e9bb (patch) | |
| tree | e96de93aab519dc4f7c8261b0a03cb0bf9339807 /tests | |
| parent | 9155d2ea6af8fb4499ea21929335d5575e9f4cca (diff) | |
| download | dotemacs-28004401fd95db7ab3038e574a2bad3f3a22e9bb.tar.gz dotemacs-28004401fd95db7ab3038e574a2bad3f3a22e9bb.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')
| -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." |
