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

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

[elpa] externals/pyim 9a6073f5f4 17/35: pyim-dhashcache-pinyin-string< -


From: ELPA Syncer
Subject: [elpa] externals/pyim 9a6073f5f4 17/35: pyim-dhashcache-pinyin-string< -> pyim-dhashcache--pinyin-string<
Date: Fri, 24 Jun 2022 08:58:06 -0400 (EDT)

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

    pyim-dhashcache-pinyin-string< -> pyim-dhashcache--pinyin-string<
---
 pyim-dhashcache.el  |  4 ++--
 tests/pyim-tests.el | 20 ++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/pyim-dhashcache.el b/pyim-dhashcache.el
index eff6d93580..756545ebaf 100644
--- a/pyim-dhashcache.el
+++ b/pyim-dhashcache.el
@@ -770,14 +770,14 @@ pyim 使用的词库文件是简单的文本文件,编码 *强制* 为 \\='utf
        pyim-dhashcache-icode2word)
       (setq export-lines
             (sort export-lines
-                  #'pyim-dhashcache-pinyin-string<))
+                  #'pyim-dhashcache--pinyin-string<))
       (goto-char (point-min))
       (insert ";;; -*- coding: utf-8-unix -*-\n")
       (dolist (line export-lines)
         (insert line))
       (pyim-dcache-write-file file confirm))))
 
-(defun pyim-dhashcache-pinyin-string< (a b)
+(defun pyim-dhashcache--pinyin-string< (a b)
   "比较 A 和 B 两个字符串的拼音的大小。"
   (let ((pinyin1 (pyim-cstring-to-pinyin-simple a))
         (pinyin2 (pyim-cstring-to-pinyin-simple b)))
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index be623f688e..1c6202d0a9 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -1222,17 +1222,17 @@ wo-hao 我好
                    '("/home/user/test3.pyim" "/home/user/test2.pyim")))))
 
 ;; ** pyim-dhashcache 相关单元测试
-(ert-deftest pyim-tests-pyim-dhashcache-pinyin-string< ()
-  (should (pyim-dhashcache-pinyin-string< "啊" "波"))
+(ert-deftest pyim-tests-pyim-dhashcache--pinyin-string< ()
+  (should (pyim-dhashcache--pinyin-string< "啊" "波"))
   (should-not (string< "锕" "波"))
-  (should (pyim-dhashcache-pinyin-string< "锕" "波"))
-  (should-not (pyim-dhashcache-pinyin-string< "波" "啊"))
-  (should (pyim-dhashcache-pinyin-string< "a" "b"))
-  (should-not (pyim-dhashcache-pinyin-string< "b" "a"))
-  (should (pyim-dhashcache-pinyin-string< "aa" "ab"))
-  (should-not (pyim-dhashcache-pinyin-string< "ab" "aa"))
-  (should (pyim-dhashcache-pinyin-string< "你不好" "你好"))
-  (should-not (pyim-dhashcache-pinyin-string< "你好" "你不好"))
+  (should (pyim-dhashcache--pinyin-string< "锕" "波"))
+  (should-not (pyim-dhashcache--pinyin-string< "波" "啊"))
+  (should (pyim-dhashcache--pinyin-string< "a" "b"))
+  (should-not (pyim-dhashcache--pinyin-string< "b" "a"))
+  (should (pyim-dhashcache--pinyin-string< "aa" "ab"))
+  (should-not (pyim-dhashcache--pinyin-string< "ab" "aa"))
+  (should (pyim-dhashcache--pinyin-string< "你不好" "你好"))
+  (should-not (pyim-dhashcache--pinyin-string< "你好" "你不好"))
   )
 
 (ert-deftest pyim-tests-pyim-dhashcache--get-ishortcodes-shortcodes ()



reply via email to

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