1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

Add format-catalog entry for unknown chan mode in ERC

* lisp/erc/erc.el (erc--process-channel-modes): Use format spec
catalog entry, and convert char to string.
(erc-message-english-channel-mode-unknown): New variable.
;; * test/lisp/erc/erc-scenarios-base-renick.el
;; (erc-scenarios-base-renick-queries-solo): Adjust timeout.
;; * test/lisp/erc/erc-scenarios-ignore.el (erc-scenarios-ignore/basic):
;; Adjust timeouts.
;; * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood):
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-basic):
;; Adjust timeouts.
;; * test/lisp/erc/resources/sasl/plain.eld: Adjust timeouts.
;; * test/lisp/erc/resources/sasl/external.eld: Adjust timeout.
;; * test/lisp/erc/resources/base/auth-source/foonet.eld: Adjust
;; timeout.
This commit is contained in:
F. Jason Park 2024-05-02 20:16:07 -07:00
parent 840c33070d
commit caddc4e727
11 changed files with 14 additions and 13 deletions

View File

@ -7473,7 +7473,7 @@ complement relevant letters in STRING."
t))
((not fallbackp)
(erc-display-message nil '(notice error) (erc-server-buffer)
(format "Unknown channel mode: %S" c)))))
'channel-mode-unknown ?c (string c)))))
(setq erc-channel-modes (sort erc-channel-modes #'string<))
(setq erc--mode-line-mode-string
(concat "+" (erc--channel-modes erc--mode-line-chanmodes-arg-len)))
@ -9404,6 +9404,7 @@ SOFTP, only do so when defined as a variable."
(incorrect-args . "Incorrect arguments. Usage:\n%c %u\n%d")
(cannot-find-file . "Cannot find file %f")
(cannot-read-file . "Cannot read file %f")
(channel-mode-unknown . "Unknown channel mode: %c")
(connect . "Connecting to %S:%p... ")
(country . "%c")
(country-unknown . "%d: No such domain")

View File

@ -177,7 +177,7 @@
(ert-info ("Joined by bouncer to #foo, pal persent")
(with-current-buffer (erc-d-t-wait-for 1 (get-buffer "#foo"))
(erc-d-t-search-for 1 "On Thursday")
(erc-d-t-search-for 5 "On Thursday")
(erc-scenarios-common-say "hi")))
(erc-d-t-wait-for 10 "Query buffer appears with message from pal"

View File

@ -62,8 +62,8 @@
(funcall expect 10 "ignoring alice for 1m0s")
(funcall expect 10 "<bob> alice: Signior Iachimo")
(erc-scenarios-common-say "/ignore")
(funcall expect 10 "alice 59s")
(funcall expect 10 "mike 59m59s")
(funcall expect 20 '(: "alice 5" (any "0-9") "s"))
(funcall expect 10 '(: "mike 59m5" (any "0-9") "s"))
(funcall expect -0.1 "<alice>")
(funcall expect 10 "<bob> alice: The ground is bloody")
(erc-scenarios-common-say "/unignore alice")

View File

@ -49,7 +49,7 @@
(ert-info ("#chan@foonet exists")
(with-current-buffer (erc-d-t-wait-for 5 (get-buffer "#chan/foonet"))
(erc-d-t-search-for 2 "<bob/foonet>")
(erc-d-t-search-for 10 "<bob/foonet>")
(erc-d-t-absent-for 0.1 "<joe")
(funcall expect 3 "was created on")))
@ -58,7 +58,7 @@
(erc-d-t-search-for 2 "<joe/barnet>")
(erc-d-t-absent-for 0.1 "<bob")
(funcall expect 3 "was created on")
(funcall expect 5 "To get good guard")))
(funcall expect 10 "To get good guard")))
(ert-info ("Message not held in queue limbo")
(with-current-buffer "#chan/foonet"

View File

@ -1,5 +1,5 @@
;; -*- mode: lisp-data; -*-
((pass 3 "PASS :barnet:changeme"))
((pass 10 "PASS :barnet:changeme"))
((nick 1 "NICK tester"))
((user 1 "USER user 0 * :tester")
(0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester")

View File

@ -1,5 +1,5 @@
;; -*- mode: lisp-data; -*-
((pass 1 "PASS :changeme"))
((pass 10 "PASS :changeme"))
((nick 1 "NICK tester"))
((user 1 "USER user 0 * :tester")
(0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")

View File

@ -34,7 +34,7 @@
(0 ":irc.barnet.org NOTICE tester :[09:05:35] This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.")
(0 ":irc.barnet.org 305 tester :You are no longer marked as being away"))
((mode 3 "MODE #chan")
((mode 10 "MODE #chan")
(0 ":irc.barnet.org 324 tester #chan +nt")
(0 ":irc.barnet.org 329 tester #chan 1620205534")
(0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: That will be given to the loudest noise we make.")

View File

@ -644,7 +644,7 @@ nonzero for this to work."
(ert-deftest erc-d-run-basic ()
:tags '(:expensive-test)
(erc-d-tests-with-server (_ _) basic
(with-current-buffer (erc-d-t-wait-for 3 (get-buffer "#chan"))
(with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#chan"))
(erc-d-t-search-for 2 "hey"))
(when noninteractive
(kill-buffer "#chan"))))

View File

@ -26,7 +26,7 @@
((join 6.47 "JOIN #spam secret")
(0.03 ":dummy!~u@w9rfqveugz722.irc JOIN #spam"))
((mode 1 "MODE #spam")
((mode-spam 10 "MODE #spam")
(0.01 ":irc.foonet.org 353 dummy = #spam :~tester dummy")
(0.00 ":irc.foonet.org 366 dummy #spam :End of NAMES list")
(0.01 ":irc.foonet.org 324 dummy #spam +knt secret")

View File

@ -28,6 +28,6 @@
(0.21 ":irc.example.org 266 tester 1 1 :Current global users 1, max 1")
(0.0 ":irc.example.org 422 tester :MOTD File is missing"))
((mode-user 1.2 "MODE tester +i")
((mode-user 10 "MODE tester +i")
(0.0 ":irc.example.org 221 tester +Zi")
(0.0 ":irc.example.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect."))

View File

@ -30,7 +30,7 @@
(0.21 ":irc.example.org 266 tester 1 1 :Current global users 1, max 1")
(0.0 ":irc.example.org 422 tester :MOTD File is missing"))
((mode-user 1.2 "MODE tester +i")
((mode-user 10 "MODE tester +i")
(0.0 ":irc.example.org 221 tester +Zi")
(0.0 ":irc.example.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect."))