branch: externals/pyim commit 7da7893114d5060572c17529cbcc9977726dd8d8 Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
* tests/pyim-tests.el (pyim-tests-pyim-import-words-and-counts): Use pyim-process-delete-word. --- tests/pyim-tests.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el index c02dfbc..da23ba2 100644 --- a/tests/pyim-tests.el +++ b/tests/pyim-tests.el @@ -475,10 +475,13 @@ :expected-result :failed (let ((file (make-temp-file "pyim-tests-import"))) ;; 删除测试用词条 - (puthash "ce-ai" nil pyim-dhashcache-icode2word) - (puthash "测㤅" nil pyim-dhashcache-iword2count) - (puthash "测嘊" nil pyim-dhashcache-iword2count) - (puthash "测伌" nil pyim-dhashcache-iword2count) + (dolist (x '("测㤅" "测嘊" "测伌")) + (pyim-process-delete-word x)) + (dolist (x '("测㤅" "测嘊" "测伌")) + (should-not (member x (pyim-dcache-get "ce-ai" '(icode2word))))) + (should-not (equal (gethash "测㤅" pyim-dhashcache-iword2count) 76543)) + (should-not (equal (gethash "测嘊" pyim-dhashcache-iword2count) 34567)) + (should-not (equal (gethash "测伌" pyim-dhashcache-iword2count) 0)) ;; 导入测试用词条 (with-temp-buffer