mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix regression in erc-send-input-line
* lisp/erc/erc.el (erc-send-input-line): Restore remedial single-space padding to ensure empty messages typed at the prompt without an explicit /msg aren't rejected by the server. This behavior is only noticeable when `erc-send-whitespace-lines' is active. * test/lisp/erc/erc-tests.el (erc-process-input-line): Add trailing newline to more correctly simulate how it's actually called by `erc-send-input'. (Bug#50008)
This commit is contained in:
parent
0590224343
commit
a9d89d083a
2 changed files with 7 additions and 5 deletions
|
|
@ -643,19 +643,19 @@
|
|||
(ert-info ("Implicit cmd via `erc-send-input-line-function'")
|
||||
|
||||
(ert-info ("Baseline")
|
||||
(erc-process-input-line "hi")
|
||||
(erc-process-input-line "hi\n")
|
||||
(should (equal (pop erc-server-flood-queue)
|
||||
'("PRIVMSG #chan :hi\r\n" . utf-8))))
|
||||
|
||||
(ert-info ("Spaces preserved")
|
||||
(erc-process-input-line "hi you")
|
||||
(erc-process-input-line "hi you\n")
|
||||
(should (equal (pop erc-server-flood-queue)
|
||||
'("PRIVMSG #chan :hi you\r\n" . utf-8))))
|
||||
|
||||
(ert-info ("Empty line transmitted without injected-space kludge")
|
||||
(erc-process-input-line "")
|
||||
(ert-info ("Empty line transmitted with injected-space kludge")
|
||||
(erc-process-input-line "\n")
|
||||
(should (equal (pop erc-server-flood-queue)
|
||||
'("PRIVMSG #chan :\r\n" . utf-8))))
|
||||
'("PRIVMSG #chan : \r\n" . utf-8))))
|
||||
|
||||
(should-not calls))))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue