diff options
Diffstat (limited to '.ai/scripts/tests')
| -rw-r--r-- | .ai/scripts/tests/test-lint-org.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/.ai/scripts/tests/test-lint-org.el b/.ai/scripts/tests/test-lint-org.el index 9328064..416f4f6 100644 --- a/.ai/scripts/tests/test-lint-org.el +++ b/.ai/scripts/tests/test-lint-org.el @@ -303,15 +303,16 @@ content (twice (plist-get (lo-test--run lo-test--md-bold 2) :result))) (should (equal once twice)))) -(ert-deftest lo-verbatim-asterisk-is-judgment () +(ert-deftest lo-verbatim-asterisk-is-suppressed () (let* ((out (lo-test--run lo-test--verbatim-asterisk)) (res (plist-get out :result)) (judgments (lo-test--judgments (plist-get out :issues)))) ;; File untouched. (should (equal lo-test--verbatim-asterisk res)) (should (= 0 (plist-get out :fixes))) - ;; Emitted as judgment with the misplaced-heading checker. - (should (member 'misplaced-heading (lo-test--checkers judgments))))) + ;; Verbatim =*** Foo= inside prose is never a real misplaced heading, so it + ;; is suppressed — no judgment emitted (compare the cj-comment suppression). + (should-not (member 'misplaced-heading (lo-test--checkers judgments))))) ;;; --------------------------------------------------------------------------- ;;; Judgment-category emission tests @@ -407,12 +408,12 @@ suspicious-language judgment." (should (string-match-p "CLOSED: \\[2026-05-14\\][^\n]*DEADLINE: <2026-05-20" res)) - ;; Judgment: every flagged broken link, suspicious-language, verbatim-asterisk - ;; emitted untouched. + ;; Judgment: every flagged broken link and suspicious-language emitted untouched. (should (member 'link-to-local-file judgment-checkers)) (should (member 'invalid-fuzzy-link judgment-checkers)) (should (member 'suspicious-language-in-src-block judgment-checkers)) - (should (member 'misplaced-heading judgment-checkers)) + ;; The verbatim-asterisk misplaced-heading is suppressed, not surfaced. + (should-not (member 'misplaced-heading judgment-checkers)) ;; Verbatim-asterisk untouched in the file. (should (lo-test--has res "=*** Foo=")))) |
