aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorF. Jason Park2024-12-06 19:09:04 -0800
committerF. Jason Park2024-12-09 11:42:45 -0800
commitdc7c38ed9ec85e2e7cbe3c9fcb3b6d5dbb5aa206 (patch)
treee1f56573f0b2e6fbb92aaefdfcf768e8c18dc6ec /test
parentd719a8140917e3b1dd6889f064ffb8e8b0621c7d (diff)
downloademacs-dc7c38ed9ec85e2e7cbe3c9fcb3b6d5dbb5aa206.tar.gz
emacs-dc7c38ed9ec85e2e7cbe3c9fcb3b6d5dbb5aa206.zip
; Slightly improve test case for erc-parse-modes
* lisp/erc/erc.el (erc--merge-local-modes): Look for a symbol's `erc-module' property before examining its name. * test/lisp/erc/erc-tests.el (erc-parse-modes): Expand case to cover alternating plus and minus mode changes.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/erc/erc-tests.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index d77d8588dad..eaff5640aa0 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -825,8 +825,11 @@
825 (should (equal (erc-parse-modes "-o bob") '(nil nil (("o" off "bob"))))) 825 (should (equal (erc-parse-modes "-o bob") '(nil nil (("o" off "bob")))))
826 (should (equal (erc-parse-modes "+uo bob") '(("u") nil (("o" on "bob"))))) 826 (should (equal (erc-parse-modes "+uo bob") '(("u") nil (("o" on "bob")))))
827 (should (equal (erc-parse-modes "+o-u bob") '(nil ("u") (("o" on "bob"))))) 827 (should (equal (erc-parse-modes "+o-u bob") '(nil ("u") (("o" on "bob")))))
828
828 (should (equal (erc-parse-modes "+uo-tv bob alice") 829 (should (equal (erc-parse-modes "+uo-tv bob alice")
829 '(("u") ("t") (("o" on "bob") ("v" off "alice"))))) 830 '(("u") ("t") (("o" on "bob") ("v" off "alice")))))
831 (should (equal (erc-parse-modes "+u-t+o-v bob alice")
832 '(("u") ("t") (("o" on "bob") ("v" off "alice")))))
830 833
831 (ert-info ("Modes of type B are always grouped as unary") 834 (ert-info ("Modes of type B are always grouped as unary")
832 (should (equal (erc-parse-modes "+k h2") '(nil nil (("k" on "h2"))))) 835 (should (equal (erc-parse-modes "+k h2") '(nil nil (("k" on "h2")))))