]> git.eshelyaron.com Git - emacs.git/commit
Make auth-source erc-services tests more readable
authorF. Jason Park <jp@neverwas.me>
Fri, 25 Nov 2022 05:03:03 +0000 (21:03 -0800)
committerF. Jason Park <jp@neverwas.me>
Sat, 8 Apr 2023 21:23:51 +0000 (14:23 -0700)
commitc104e90888a03b4879cd91bf5d130288ac880d66
treea3c3dbb2212db383682504bab9bc39db62ead94d
parent8184a815aff52cbf1f1b8680d80af2fbf2dce248
Make auth-source erc-services tests more readable

* lisp/erc/erc-common.el: (erc-with-server-buffer): Modify slightly to
use `buffer-local-value' when possible.
* test/lisp/erc/erc-services-tests.el
(erc-services-tests--auth-source-plstore-standard-entries,
erc-services-tests--auth-source-plstore-standard-secrets): Remove
unused variables.
(erc-services-tests--auth-source-plstore-standard-announced): Add new
var to hold common plstore document.
(erc--auth-source-search--plstore-standard,
erc--auth-source-search--plstore-announced,
erc--auth-source-search--plstore-overrides): Use string literals for
text-document content.
(erc-services-tests--auth-source-json-standard-entries): Remove unused
variable.
(erc-services-tests--auth-source-json-standard-announced): Add new
variable.
(erc--auth-source-search--json-standard,
erc--auth-source-search--json-announced,
erc--auth-source-search--json-overrides): Use string literals for
text-document content.
(erc-services-tests--secrets-search-items): Add new helper function.
(erc--auth-source-search--secrets-standard,
erc--auth-source-search--secrets-announced,
erc--auth-source-search--secrets-overrides): Use helper to mock
`secrets-search-items' instead of misleading lambda.
* lisp/erc/erc-tests.el (erc-with-server-buffer): Add test.
lisp/erc/erc-common.el
test/lisp/erc/erc-services-tests.el
test/lisp/erc/erc-tests.el