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 | c3be268cb0834c86cf0389d2779a740cd52db9c4 (patch) | |
| tree | 3c487929bd6e34ba248810a1fba8894b383b544c /tests/test-custom-comments-comment-heavy-box.el | |
| parent | b54ec5aac9e25b534686c13aa2d09a61200c6fd9 (diff) | |
| download | dotemacs-c3be268cb0834c86cf0389d2779a740cd52db9c4.tar.gz dotemacs-c3be268cb0834c86cf0389d2779a740cd52db9c4.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 94d4aaa5..8acb9ff0 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." |
