mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-10 07:46:51 -04:00
Allow slashes and periods in ERC ISUPPORT params
* lisp/erc/erc-backend.el (erc-server-005): Add "." and "/" to regexp for parameter keys as per the updated recommendation of the living specification. See https://github.com/ircdocs/modern-irc/pull/251 and the corresponding issue it closed. * test/lisp/erc/erc-tests.el (erc-server-005): Expect slashes and periods in parameter keys.
This commit is contained in:
parent
cab6a0d0e3
commit
badce2d952
|
|
@ -2381,8 +2381,8 @@ A server may send more than one 005 message."
|
|||
value
|
||||
negated)
|
||||
(when (string-match
|
||||
(rx bot (| (: (group (+ (any "A-Z"))) "=" (group (* nonl)))
|
||||
(: (? (group "-")) (group (+ (any "A-Z")))))
|
||||
(rx bot (| (: (group (+ (any "A-Z./"))) "=" (group (* nonl)))
|
||||
(: (? (group "-")) (group (+ (any "A-Z./")))))
|
||||
eot)
|
||||
section)
|
||||
(setq key (or (match-string 1 section) (match-string 4 section))
|
||||
|
|
|
|||
|
|
@ -1305,7 +1305,8 @@
|
|||
(lambda (_ _ _ line) (push line calls))))
|
||||
|
||||
(ert-info ("Baseline")
|
||||
(setq args '("tester" "BOT=B" "CHANTYPES=" "EXCEPTS" "PREFIX=(ov)@+"
|
||||
(setq args '("tester" "BOT=B" "A.B/c=d"
|
||||
"CHANTYPES=" "EXCEPTS" "PREFIX=(ov)@+"
|
||||
"are supp...")
|
||||
parsed (make-erc-response :command-args args :command "005"))
|
||||
|
||||
|
|
@ -1316,14 +1317,17 @@
|
|||
;; Should be ("CHANTYPES") but
|
||||
;; retained for compatibility.
|
||||
("CHANTYPES" . "")
|
||||
("A.B/c" . "d")
|
||||
("BOT" . "B"))))
|
||||
(should (zerop (hash-table-count erc--isupport-params)))
|
||||
(should (equal "(ov)@+" (erc--get-isupport-entry 'PREFIX t)))
|
||||
(should (equal '(EXCEPTS) (erc--get-isupport-entry 'EXCEPTS)))
|
||||
(should (equal "B" (erc--get-isupport-entry 'BOT t)))
|
||||
(should (string=
|
||||
(pop calls)
|
||||
"BOT=B CHANTYPES= EXCEPTS PREFIX=(ov)@+ are supp..."))
|
||||
(should (equal "d" (erc--get-isupport-entry 'A.B/c t)))
|
||||
(should
|
||||
(string=
|
||||
"BOT=B A.B/c=d CHANTYPES= EXCEPTS PREFIX=(ov)@+ are supp..."
|
||||
(pop calls)))
|
||||
(should (equal args (erc-response.command-args parsed)))))
|
||||
|
||||
(erc-call-hooks nil parsed))
|
||||
|
|
@ -1336,7 +1340,8 @@
|
|||
(setq verify
|
||||
(lambda ()
|
||||
(should (equal erc-server-parameters
|
||||
'(("PREFIX" . "(ohv)@%+") ("BOT" . "B"))))
|
||||
'(("PREFIX" . "(ohv)@%+") ("A.B/c" . "d")
|
||||
("BOT" . "B"))))
|
||||
(should (string-prefix-p
|
||||
"-EXCEPTS -CHANTYPES -FAKE PREFIX=(ohv)@%+ "
|
||||
(pop calls)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue