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

    * tests/pyim-tests.el (pyim-tests-pyim-dhashcache-get-path): New test.
---
 tests/pyim-tests.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 18c0830..0d945b6 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -607,6 +607,11 @@
   (should (equal (pyim-dhashcache-get-shortcode "ni-hao") nil))
   (should (equal (pyim-dhashcache-get-shortcode "") nil)))
 
+(ert-deftest pyim-tests-pyim-dhashcache-get-path ()
+  (let ((pyim-dcache-directory "/tmp/dcache"))
+    (should (equal (pyim-dhashcache-get-path 'hello) "/tmp/dcache/hello"))
+    (should (equal (pyim-dhashcache-get-path "hello") nil))))
+
 ;; ** pyim-dregcache 相关单元测试
 (ert-deftest pyim-tests-pyim-general ()
   (let ((pyim-dcache-backend 'pyim-dregcache))

Reply via email to