diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-08 18:22:47 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-12-08 18:22:47 +0100 |
commit | 1fb099ceb0269e8e74bd0f8dc98eb1da156becbd (patch) | |
tree | e6d27f84a4a6514f2308d80bce57d13eb4d2714a /test | |
parent | ef711b1556f83c9aa841fec9927672245408fc9c (diff) | |
download | emacs-1fb099ceb0269e8e74bd0f8dc98eb1da156becbd.tar.gz |
Make rcirc nick renaming heed nickname max lengths
* lisp/net/rcirc.el (rcirc-server-parameters): New variable (bug#6795).
(rcirc-connect): Set it.
(rcirc-handler-433): Use the length from the server.
(rcirc-handler-005): Collect server data.
(rcirc-server-parameter-value): New utility function.
(rcirc--make-new-nick): New function.
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/net/rcirc-tests.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lisp/net/rcirc-tests.el b/test/lisp/net/rcirc-tests.el index 285926af9d2..cbd1c2be830 100644 --- a/test/lisp/net/rcirc-tests.el +++ b/test/lisp/net/rcirc-tests.el @@ -51,4 +51,16 @@ "MODE #cchan +kl :a:b" nil "MODE" '("#cchan" "+kl" "a:b"))) +(ert-deftest rcirc-rename-nicks () + (should (equal (rcirc--make-new-nick "foo" 16) + "foo`")) + (should (equal (rcirc--make-new-nick "123456789012345" 16) + "123456789012345`")) + (should (equal (rcirc--make-new-nick "1234567890123456" 16) + "123456789012345`")) + (should (equal (rcirc--make-new-nick "123456789012345`" 16) + "12345678901234``")) + (should (equal (rcirc--make-new-nick "123456789012````" 16) + "12345678901`````"))) + ;;; rcirc-tests.el ends here |