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

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

[elpa] externals/pyim 34fb29e791 3/3: Update pyim-tests-pyim-cregexp


From: ELPA Syncer
Subject: [elpa] externals/pyim 34fb29e791 3/3: Update pyim-tests-pyim-cregexp
Date: Tue, 6 Sep 2022 04:58:03 -0400 (EDT)

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

    Update pyim-tests-pyim-cregexp
---
 pyim-cregexp.el     | 1 +
 tests/pyim-tests.el | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/pyim-cregexp.el b/pyim-cregexp.el
index bd40e38216..74205e0a2a 100644
--- a/pyim-cregexp.el
+++ b/pyim-cregexp.el
@@ -142,6 +142,7 @@ regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子
                 (xr (pyim-cregexp--create-cregexp-from-string
                      x scheme char-level-num chinese-only))
               x))
+          ;; FIXME: (xr "ni\\hao") 结果应该是 ni\\hao, 但实际是 nihao.
           (xr string))))
       string))
 
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 8d7aa0979c..9fb3e98eb8 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -953,6 +953,13 @@
     (should (equal (pyim-scheme-name (pyim-cregexp--scheme)) 'quanpin))))
 
 (ert-deftest pyim-tests-pyim-cregexp ()
+  ;; FIXME: 这个 test 有问题,以后需要更新。
+  (let ((regexp (pyim-cregexp-build "ni\\hao")))
+    (should (string-match-p regexp "nihao"))
+    (should (string-match-p regexp "anihaob"))
+    (should (string-match-p regexp "你好"))
+    (should (string-match-p regexp "哈哈你好吗")))
+
   (let ((regexp (pyim-cregexp-build "nihao")))
     (should (string-match-p regexp "nihao"))
     (should (string-match-p regexp "anihaob"))



reply via email to

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