branch: externals/pyim
commit 243b8836659c6fdb6c4c592a4e87dae2f6eebab1
Author: Feng Shu <tuma...@163.com>
Commit: Feng Shu <tuma...@163.com>

    * tests/pyim-tests.el (pyim-tests-pyim-process-ui-refresh): Added.
---
 tests/pyim-tests.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index ae5a2f8ffb..474c25bdac 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1836,6 +1836,18 @@ Transfer-Encoding: chunked
     (cl-pushnew 'test pyim-process-self-insert-commands)
     (should (pyim-process-self-insert-command-p 'test))))
 
+(ert-deftest pyim-tests-pyim-process-ui-refresh ()
+  (let* ((result1 nil)
+         (result2 nil)
+         (pyim-process-ui-refresh-hook
+          (list (lambda (x)
+                  (setq result1 "result1"))
+                (lambda (x)
+                  (setq result2 "result2")))))
+    (pyim-process-ui-refresh)
+    (should (equal result1 "result1"))
+    (should (equal result2 "result2"))))
+
 (ert-deftest pyim-tests-pyim-process-merge-candidates ()
   (should (equal (pyim-process-merge-candidates
                   '("a" "b" "c") '("d" "e" "f" "a" "b"))

Reply via email to