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

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

[elpa] externals/pyim 2d33442 4/5: * tests/pyim-tests.el (pyim-tests-pyi


From: ELPA Syncer
Subject: [elpa] externals/pyim 2d33442 4/5: * tests/pyim-tests.el (pyim-tests-pyim-add-unread-command-events): New test.
Date: Fri, 10 Dec 2021 21:57:41 -0500 (EST)

branch: externals/pyim
commit 2d334422e96ed22591bf25ffcae12b025957326c
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    * tests/pyim-tests.el (pyim-tests-pyim-add-unread-command-events): New test.
---
 tests/pyim-tests.el | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 183e82f..4196dff 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -116,6 +116,27 @@
                  '("a-b-c-d" "a-b-c" "a-b")))
   (should (equal (pyim-subconcat nil) nil)))
 
+(ert-deftest pyim-tests-pyim-add-unread-command-events ()
+  (let ((unread-command-events nil))
+    (pyim-add-unread-command-events ?a)
+    (should (equal unread-command-events
+                   '((no-record . 97))))
+    (pyim-add-unread-command-events "b")
+    (should (equal unread-command-events
+                   '((no-record . 98)
+                     (no-record . 97))))
+    (pyim-add-unread-command-events "cd")
+    (should (equal unread-command-events
+                   '((no-record . 99)
+                     (no-record . 100)
+                     (no-record . 98)
+                     (no-record . 97))))
+    (pyim-add-unread-command-events "e" t)
+    (should (equal unread-command-events
+                   '((no-record . 101))))
+    (pyim-add-unread-command-events nil t)
+    (should (equal unread-command-events nil))))
+
 (ert-deftest pyim-tests-pyim-time-limit-while ()
   (let ((time (current-time))
         (limit 0.1))



reply via email to

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