[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim ed44b57 1/3: * tests/pyim-tests.el (pyim-tests-pyi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim ed44b57 1/3: * tests/pyim-tests.el (pyim-tests-pyim-dcache-save/read-variable-value): New test. |
Date: |
Tue, 14 Dec 2021 22:57:30 -0500 (EST) |
branch: externals/pyim
commit ed44b579dfc536409a486d84f2932f48f0d722cf
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* tests/pyim-tests.el (pyim-tests-pyim-dcache-save/read-variable-value):
New test.
---
tests/pyim-tests.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 4ff9df2..cc5208a 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -617,6 +617,15 @@
(should (equal (gethash "测嘊" pyim-dhashcache-iword2count) 34567))
(should (equal (gethash "测伌" pyim-dhashcache-iword2count) 0))))
+;; ** pyim-dcache 相关单元测试
+(ert-deftest pyim-tests-pyim-dcache-save/read-variable-value ()
+ (let ((file (make-temp-file "pyim-dcache-"))
+ (value (make-hash-table :test #'equal)))
+ (puthash "ni-hao" (list "你好") value)
+ (pyim-dcache-save-value-to-file value file)
+ (should (equal (gethash "ni-hao" (pyim-dcache-get-value-from-file file))
+ '("你好")))))
+
;; ** pyim-dhashcache 相关单元测试
(ert-deftest pyim-tests-pyim-dhashcache-get-shortcodes ()
(should (equal (pyim-dhashcache-get-shortcodes ".abcde") nil))