diff options
author | Ulrich Müller <ulm@gentoo.org> | 2024-09-30 18:19:10 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2024-10-02 23:00:39 +0200 |
commit | a4931d9f666f0daba7e5ca5640337279d9b36a27 (patch) | |
tree | 7db16c1101ecdadea5b6d1e92da7728bc23d9b7d | |
parent | Fix a byte-compiler warning in tests (diff) | |
download | ebuild-mode-a4931d9f666f0daba7e5ca5640337279d9b36a27.tar.gz ebuild-mode-a4931d9f666f0daba7e5ca5640337279d9b36a27.tar.bz2 ebuild-mode-a4931d9f666f0daba7e5ca5640337279d9b36a27.zip |
Shorten some function names in tests
* 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 <ulm@gentoo.org>
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | test/gentoo-newsitem-mode-tests.el | 18 |
2 files changed, 13 insertions, 9 deletions
@@ -1,5 +1,9 @@ 2024-09-30 Ulrich Müller <ulm@gentoo.org> + * 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 <larry@example.org>" "" ; 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 |