mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Use helper to get erc-networks--id symbol as string
* lisp/erc/erc-networks.el (erc-networks--id-string): New function. (erc-networks--construct-target-buffer-name) (erc-networks--ensure-unique-server-buffer-name) (erc-networks--rename-server-buffer): Use it. * lisp/erc/erc-nicks.el (erc-nicks-list-faces): Use it. * lisp/erc/erc-status-sidebar.el (erc-status-sidebar-pad-hierarchy): Use it. * lisp/erc/erc.el (erc-generate-new-buffer-name) (erc-log-irc-protocol) (erc--auth-source-determine-params-defaults) (erc-format-target-and/or-network): Use it. * test/lisp/erc/erc-networks-tests.el (erc-networks--id-string): New test.
This commit is contained in:
parent
d25689d6e2
commit
7fc048ca77
5 changed files with 26 additions and 19 deletions
|
|
@ -76,6 +76,14 @@
|
|||
:symbol 'fake.chat)))))
|
||||
(kill-buffer))))
|
||||
|
||||
(ert-deftest erc-networks--id-string ()
|
||||
(should (equal (erc-networks--id-string (erc-networks--id-fixed-create 'foo))
|
||||
"foo"))
|
||||
(should (equal (let* ((erc-network 'FooNet)
|
||||
(erc-server-current-nick "Joe")) ; needs letstar
|
||||
(erc-networks--id-string (erc-networks--id-create nil)))
|
||||
"FooNet")))
|
||||
|
||||
(ert-deftest erc-networks--id-create ()
|
||||
(cl-letf (((symbol-function 'float-time)
|
||||
(lambda (&optional _) 0.0)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue