From a4931d9f666f0daba7e5ca5640337279d9b36a27 Mon Sep 17 00:00:00 2001 From: Ulrich Müller Date: Mon, 30 Sep 2024 18:19:10 +0200 Subject: Shorten some function names in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test/gentoo-newsitem-mode-tests.el (gentoo-newsitem-test-input) (gentoo-newsitem-test-font-lock, gentoo-newsitem-test-skeleton) (gentoo-newsitem-test-keybindings): Shorten names. Signed-off-by: Ulrich Müller --- ChangeLog | 4 ++++ test/gentoo-newsitem-mode-tests.el | 18 +++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ec852a..e9ac90f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2024-09-30 Ulrich Müller + * test/gentoo-newsitem-mode-tests.el (gentoo-newsitem-test-input) + (gentoo-newsitem-test-font-lock, gentoo-newsitem-test-skeleton) + (gentoo-newsitem-test-keybindings): Shorten names. + * test/ebuild-mode-tests.el (ebuild-mode-test-run-with-fixed-time): * test/glep-mode-tests.el (glep-mode-test-run-with-fixed-time): Use func-arity to detect the calling convention for encode-time. diff --git a/test/gentoo-newsitem-mode-tests.el b/test/gentoo-newsitem-mode-tests.el index b1363bd..1ee2858 100644 --- a/test/gentoo-newsitem-mode-tests.el +++ b/test/gentoo-newsitem-mode-tests.el @@ -28,12 +28,12 @@ (defalias 'cl-letf #'letf) (defalias 'cl-letf* #'letf*))) -(defvar gentoo-newsitem-mode-test-input nil) +(defvar gentoo-newsitem-test-input nil) -(defun gentoo-newsitem-mode-test-input (&rest _args) - (concat (pop gentoo-newsitem-mode-test-input))) +(defun gentoo-newsitem-test-input (&rest _args) + (concat (pop gentoo-newsitem-test-input))) -(ert-deftest gentoo-newsitem-mode-test-font-lock () +(ert-deftest gentoo-newsitem-test-font-lock () (with-temp-buffer (gentoo-newsitem-mode) (insert "Author: Larry the Cow\n") @@ -47,13 +47,13 @@ (search-forward "Larry") (should-not (get-text-property (match-beginning 0) 'face)))) -(ert-deftest gentoo-newsitem-mode-test-skeleton () +(ert-deftest gentoo-newsitem-test-skeleton () (with-temp-buffer (cl-letf (((symbol-function 'read-from-minibuffer) - #'gentoo-newsitem-mode-test-input) + #'gentoo-newsitem-test-input) ((symbol-function 'read-string) - #'gentoo-newsitem-mode-test-input)) - (setq gentoo-newsitem-mode-test-input + #'gentoo-newsitem-test-input)) + (setq gentoo-newsitem-test-input '("Skeleton test" ; Title "Larry the Cow " "" ; Author "" ; Translator @@ -76,7 +76,7 @@ "Revision: 1\n" "News-Item-Format: 2.0\n\n")))))) -(ert-deftest gentoo-newsitem-mode-test-keybindings () +(ert-deftest gentoo-newsitem-test-keybindings () (should (equal (lookup-key gentoo-newsitem-mode-map "\C-c\C-n") 'gentoo-newsitem-insert-skeleton)) (with-temp-buffer -- cgit v1.2.3-65-gdbad