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

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

[elpa] externals/pyim 6d68a1f451 04/41: * tests/pyim-tests.el (pyim-test


From: ELPA Syncer
Subject: [elpa] externals/pyim 6d68a1f451 04/41: * tests/pyim-tests.el (pyim-tests-pyim-candidates-create-xingma): New test.
Date: Sat, 4 Jun 2022 09:57:45 -0400 (EDT)

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

    * tests/pyim-tests.el (pyim-tests-pyim-candidates-create-xingma): New test.
---
 tests/pyim-tests.el | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 9e30562272..710cfdc77b 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -485,6 +485,34 @@
     (should (equal (pyim-candidates-get-chief quanpin personal-words3 nil)
                    "美丽"))))
 
+(ert-deftest pyim-tests-pyim-candidates-create-xingma ()
+  (let ((wubi (pyim-scheme-get 'wubi))
+        (pyim-dhashcache-icode2word
+         (read "#s(hash-table size 1642 test equal rehash-size 1.5 
rehash-threshold 0.8125 data (\"wubi/aaaa\" (\"工\" \"㠭\") \"wubi/bbbb\" (\"子\" 
\"子子孙孙孙孙\") \"wubi/cccc\" (\"又\" \"叕\")))"))
+        (pyim-dhashcache-code2word
+         (read "#s(hash-table size 1642 test equal rehash-size 1.5 
rehash-threshold 0.8125 data (\"wubi/aaaa\" (\"㠭\") \"wubi/bbbb\" (\"子子孙孙\" 
\"子\") \"wubi/cccc\" (\"叕\" \"又\")))")))
+    (should (equal (pyim-candidates-create
+                    (pyim-imobjs-create "aaaa" wubi)
+                    wubi)
+                   '("㠭" "工")))
+    (should (equal (pyim-candidates-create
+                    (pyim-imobjs-create "bbbb" wubi)
+                    wubi)
+                   '("子" "子子孙孙孙孙" "子子孙孙")))
+    (should (equal (pyim-candidates-create
+                    (pyim-imobjs-create "cccc" wubi)
+                    wubi)
+                   '("叕" "又")))
+    (should (equal (pyim-candidates-create
+                    (pyim-imobjs-create "aaaabbbb" wubi)
+                    wubi)
+                   '("㠭子" "㠭子子孙孙孙孙" "㠭子子孙孙")))
+    (should (equal
+             (pyim-candidates-create
+              (pyim-imobjs-create "aaaabbbbcccc" wubi)
+              wubi)
+             '("㠭子叕" "㠭子又")))))
+
 (ert-deftest pyim-tests-pyim-candidates-search-buffer ()
   (with-temp-buffer
     (insert "你好你好你坏你坏你话牛蛤牛和牛蛤牛蛤牛蛤牛蛤牛蛤")



reply via email to

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