]> git.eshelyaron.com Git - emacs.git/commit
Add baseline test coverage for erc-match
authorF. Jason Park <jp@neverwas.me>
Thu, 10 Oct 2024 23:17:03 +0000 (16:17 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 14 Oct 2024 17:38:35 +0000 (19:38 +0200)
commit108fdb5c9a09fdcf98e57fa87f1c369f00f63337
treef80acc9a35d164b0d2d14d894bcaf71c58e04a7d
parent612d013f60d58b9ddae736e60fbacdfcfc75cfcc
Add baseline test coverage for erc-match

* lisp/erc/erc-match.el (erc-pal-highlight-type)
(erc-fool-highlight-type, erc-dangerous-host-highlight-type): Clarify
some areas in doc strings.
* test/lisp/erc/erc-match-tests.el: Require `erc-test-common' library.
(erc-match-tests--assert-face-absent)
(erc-match-tests--assert-face-present)
(erc-match-tests--assert-speaker-highlighted)
(erc-match-tests--assert-speaker-only-highlighted)
(erc-match-tests--perform)
(erc-match-tests--hl-type-nick): New functions.
(erc-match-message/pal/nick, erc-match-message/fool/nick)
(erc-match-message/dangerous-host/nick): New tests.
(erc-match-tests--hl-type-message): New function.
(erc-match-message/pal/message)
(erc-match-message/fool/message)
(erc-match-message/dangerous-host/message): New tests.
(erc-match-tests--hl-type-all): New function.
(erc-match-message/pal/all, erc-match-message/fool/all)
(erc-match-message/dangerous-host/all): New tests.
(erc-match-tests--hl-type-nick-or-keyword): New function.
(erc-match-message/current-nick/nick-or-keyword): New test.
(erc-match-tests--hl-type-keyword): New function.
(erc-match-message/keyword/keyword): New test.
(erc-match-tests--log-matches): New function.
(erc-log-matches): New test.
* test/lisp/erc/resources/erc-tests-common.el: Require `erc-d-i'.
(erc-tests-common-add-cmem, erc-tests-common-parse-line)
(erc-tests-common-simulate-line)
(erc-tests-common-simulate-privmsg): New functions.

(cherry picked from commit 9bddb264ba851f39068773b9538de4170928e159)
lisp/erc/erc-match.el
test/lisp/erc/erc-match-tests.el
test/lisp/erc/resources/erc-tests-common.el