From 1b55dcb828093774ebbb83888901644a8c73a67d Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Sun, 12 Sep 2021 02:41:39 -0700 Subject: [PATCH 0/2] *** SUBJECT HERE *** MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *** BLURB HERE *** F. Jason Park (2): Fix mistake in test for erc-ring-previous-command Fix a couple byte-compiler warnings in erc.el lisp/erc/erc.el | 25 ++++------- test/lisp/erc/erc-tests.el | 91 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 21 deletions(-) Range-diff: -: ---------- > 1: d3cbfba5d6 Fix mistake in test for erc-ring-previous-command 1: 8a85439cc7 ! 2: 1b55dcb828 Fix a couple byte-compiler warnings in erc.el @@ Commit message Fix a couple byte-compiler warnings in erc.el * lisp/erc/erc.el (erc-lurker-maybe-trim): Prevent warning from - showing up in third-party code re library not loaded by autoloading - rx.el when needed. Also make function do what it claims to. It now - only removes trailing chars typically appended automatically for - uniquifying purposes when a desired nick is already taken. Special - thanks to Mattias EngdegÄrd for making this more - respectable. Bug#50005. + showing up in third-party code using this function by autoloading + rx.el when needed. Remove trailing chars appended for uniquifying + purposes when a nick is already taken. Special thanks to Mattias + EngdegÄrd for making this more respectable. Bug#50005. (erc-with-all-buffers-of-server): Mute byte compiler warning saying - return value unused. Leave possible optimizations for some future - person. + return value unused. Leave optimizations for future contributors. + + * test/lisp/erc/erc-tests.el: add tests for the above and require + erc-networks. ## lisp/erc/erc.el ## @@ lisp/erc/erc.el: erc-with-all-buffers-of-server @@ lisp/erc/erc.el: erc-lurker-maybe-trim (defcustom erc-lurker-hide-list nil ## test/lisp/erc/erc-tests.el ## +@@ + (require 'ert) + (require 'erc) + (require 'erc-ring) ++(require 'erc-networks) + + (ert-deftest erc--read-time-period () + (cl-letf (((symbol-function 'read-string) (lambda (&rest _) ""))) @@ test/lisp/erc/erc-tests.el: erc--read-time-period (cl-letf (((symbol-function 'read-string) (lambda (&rest _) "1d"))) (should (equal (erc--read-time-period "foo: ") 86400)))) -- 2.31.1