emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil-numbers 08f0c1ee93 145/145: Cleanup: warnings for tes


From: ELPA Syncer
Subject: [nongnu] elpa/evil-numbers 08f0c1ee93 145/145: Cleanup: warnings for tests
Date: Thu, 6 Jan 2022 03:00:26 -0500 (EST)

branch: elpa/evil-numbers
commit 08f0c1ee93b8a563770eaefaf21ab9087fca7bdb
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Cleanup: warnings for tests
---
 tests/evil-numbers-tests.el | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/tests/evil-numbers-tests.el b/tests/evil-numbers-tests.el
index eb84f5694c..9597008430 100644
--- a/tests/evil-numbers-tests.el
+++ b/tests/evil-numbers-tests.el
@@ -19,7 +19,7 @@
 
 ;; See: `evil-numbers-tests.sh' for launching this script.
 
-;; TODO: tests that handle bugs. #20, #21, #24, #26, #27
+;; TODO: tests that handle bugs: #20, #21, #24, #26, #27.
 ;; Bugs fixed in:
 ;; c37a4cf92a9cf8aa9f8bd752ea856a9d1bc6c84c
 
@@ -28,6 +28,8 @@
 ;; ;; Caller ensures this.
 ;; (require 'evil-numbers)
 
+;;; Code:
+
 ;; ---------------------------------------------------------------------------
 ;; Global State
 
@@ -44,23 +46,25 @@
 ;; Internal Functions/Macros
 
 (defmacro simulate-input (&rest keys)
-  "Helper macro to simulate input."
+  "Helper macro to simulate input using KEYS."
   (declare (indent 1))
   `(let ((keys-list (list ,@keys)))
      (dolist (keys keys-list)
        (execute-kbd-macro keys))))
 
-(defun buffer-reset-text (initial-buffer)
+(defun buffer-reset-text (initial-buffer-text)
+  "Use INITIAL-BUFFER-TEXT to initialize the buffer with text."
   (buffer-disable-undo)
   (simulate-input (kbd "i"))
   (erase-buffer)
   ;; Don't move the cursor.
-  (save-excursion (insert initial-buffer))
+  (save-excursion (insert initial-buffer-text))
   (simulate-input (kbd "<escape>"))
   (buffer-enable-undo))
 
 (defmacro with-evil-numbers-test (initial-buffer-text &rest body)
-  "Run BODY adding any message call to the MESSAGE-LIST list."
+  "Run BODY adding any message call to the MESSAGE-LIST list.
+Setting the buffers text to INITIAL-BUFFER-TEXT."
   (declare (indent 1))
   ;; Messages make test output noisy (mainly evil mode switching messages).
   ;; Disable when debugging tests.
@@ -310,3 +314,6 @@
       (kbd "C-M-a")             ;; Increment.
       "a|")                     ;; Show cursor location.
      (should (equal text-expected (buffer-string))))))
+
+(provide 'evil-numbers-tests)
+;;; evil-numbers-tests.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]