[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim d273b67dcd 1/2: * tests/pyim-tests.el (pyim-tests-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim d273b67dcd 1/2: * tests/pyim-tests.el (pyim-tests-pyim-entered): New test. |
Date: |
Mon, 27 Dec 2021 01:57:43 -0500 (EST) |
branch: externals/pyim
commit d273b67dcd7dfe51ff8674348ef9776f166d604e
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* tests/pyim-tests.el (pyim-tests-pyim-entered): New test.
---
tests/pyim-tests.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 1a9652332e..06c5ba03fe 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -301,6 +301,18 @@
(should (equal (pyim-punctuation-return-proper-punct '("'" "‘" "’")) "‘"))
(should (equal (pyim-punctuation-return-proper-punct '("'" "‘" "’"))
"’"))))
+;; ** pyim-entered 相关单元测试
+(ert-deftest pyim-tests-pyim-entered ()
+ (pyim-entered-with-entered-buffer
+ (erase-buffer)
+ (insert "nihao")
+ (backward-char 3))
+ (should (equal (pyim-entered-get) "nihao"))
+ (should (equal (pyim-entered-get 'point-before) "ni"))
+ (should (equal (pyim-entered-get 'point-after) "hao"))
+ (pyim-entered-erase-buffer)
+ (should (equal (pyim-entered-get) "")))
+
;; ** pyim-impobjs 相关单元测试
(ert-deftest pyim-tests-pyim-imobjs ()
(let ((pyim-pinyin-fuzzy-alist '(("en" "eng")