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

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

[elpa] externals/pyim d5d98bdbdb 12/58: pyim-cstring-partition -> pyim-c


From: ELPA Syncer
Subject: [elpa] externals/pyim d5d98bdbdb 12/58: pyim-cstring-partition -> pyim-cstring--partition
Date: Fri, 24 Jun 2022 06:57:52 -0400 (EDT)

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

    pyim-cstring-partition -> pyim-cstring--partition
---
 pyim-cstring-utils.el |  2 +-
 pyim-cstring.el       |  4 ++--
 tests/pyim-tests.el   | 14 +++++++-------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/pyim-cstring-utils.el b/pyim-cstring-utils.el
index 8fc854904d..7924b13101 100644
--- a/pyim-cstring-utils.el
+++ b/pyim-cstring-utils.el
@@ -98,7 +98,7 @@ CHINESE-STRING 分词,得到一个词条 alist,这个 alist 的元素都是
                      (pyim-cstring-split-to-string-1
                       str prefer-short-word separator max-word-length)
                    str)))
-             (pyim-cstring-partition string) (or separator " ")))
+             (pyim-cstring--partition string) (or separator " ")))
 
 (defun pyim-cstring-split-to-string-1 (chinese-string &optional 
prefer-short-word
                                                       separator 
max-word-length)
diff --git a/pyim-cstring.el b/pyim-cstring.el
index 8a8a76dbdb..9c97c81fde 100644
--- a/pyim-cstring.el
+++ b/pyim-cstring.el
@@ -37,7 +37,7 @@
   "Chinese string tools for pyim."
   :group 'pyim)
 
-(defun pyim-cstring-partition (string &optional to-cchar)
+(defun pyim-cstring--partition (string &optional to-cchar)
   "STRING partition.
 
 1. Hello你好 -> (\"Hello\" \"你\" \"好\"), when TO-CCHAR is non-nil.
@@ -124,7 +124,7 @@ BUG: 当 STRING 中包含其它标点符号,并且设置 SEPERATER 时,结
                       (if (pyim-string-match-p "\\cc" str)
                           (pyim-pymap-cchar2py-get str)
                         (list str)))
-                    (pyim-cstring-partition string t)))
+                    (pyim-cstring--partition string t)))
 
       ;; 通过排列组合的方式, 重排 pinyins-list。
       ;; 比如:(("Hello") ("yin") ("hang" "xing")) -> (("Hello" "yin" "hang") 
("Hello" "yin" "xing"))
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 8eb8f7f643..dff65f422a 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -712,18 +712,18 @@
       (should (equal (get-text-property 0 :comment (car words)) "(buf)")))))
 
 ;; ** pyim-cstring 相关单元测试
-(ert-deftest pyim-tests-pyim-cstring-partition ()
-  (should (equal (pyim-cstring-partition "你好 hello 你好")
+(ert-deftest pyim-tests-pyim-cstring--partition ()
+  (should (equal (pyim-cstring--partition "你好 hello 你好")
                  '("你好" " hello " "你好")))
-  (should (equal (pyim-cstring-partition "你好 hello 你好" t)
+  (should (equal (pyim-cstring--partition "你好 hello 你好" t)
                  '("你" "好" " hello " "你" "好")))
-  (should (equal (pyim-cstring-partition "你好")
+  (should (equal (pyim-cstring--partition "你好")
                  '("你好")))
-  (should (equal (pyim-cstring-partition "你好" t)
+  (should (equal (pyim-cstring--partition "你好" t)
                  '("你" "好")))
-  (should (equal (pyim-cstring-partition "hello")
+  (should (equal (pyim-cstring--partition "hello")
                  '("hello")))
-  (should (equal (pyim-cstring-partition "hello" t)
+  (should (equal (pyim-cstring--partition "hello" t)
                  '("hello"))))
 
 (ert-deftest pyim-tests-pyim-cstring-substrings ()



reply via email to

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