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

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

[elpa] externals/pyim 01fa7c13d9 1/5: * tests/pyim-tests.el (pyim-tests-


From: ELPA Syncer
Subject: [elpa] externals/pyim 01fa7c13d9 1/5: * tests/pyim-tests.el (pyim-tests-pyim-dcache-insert-word): New test.
Date: Sat, 11 Jun 2022 19:57:50 -0400 (EDT)

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

    * tests/pyim-tests.el (pyim-tests-pyim-dcache-insert-word): New test.
---
 tests/pyim-tests.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 474c25bdac..edc5c2cc62 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1025,6 +1025,16 @@
 ni-hao 你好 尼耗
 ")))))
 
+(ert-deftest pyim-tests-pyim-dcache-insert-word ()
+  (let ((pyim-dcache-backend 'pyim-dhashcache)
+        (pyim-dhashcache-icode2word (make-hash-table :test #'equal)))
+    (pyim-dcache-insert-word "你好" "ni-hao" t)
+    (pyim-dcache-insert-word "尼耗" "ni-hao" t)
+    (pyim-dcache-insert-word "呢耗" "ni-hao" nil)
+    (pyim-dcache-insert-word (propertize "你豪" :noexport t) "ni-hao" nil)
+    (should (equal (gethash "ni-hao" pyim-dhashcache-icode2word)
+                   '("尼耗" "你好" "呢耗" #("你豪" 0 2 (:noexport t)))))))
+
 ;; ** pyim-dict 相关单元测试
 (ert-deftest pyim-tests-pyim-dict ()
   (let ((pyim-extra-dicts nil)



reply via email to

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