[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 5c4500d 2/5: * tests/pyim-tests.el (pyim-tests-pyi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 5c4500d 2/5: * tests/pyim-tests.el (pyim-tests-pyim-dline-parse): New test. |
Date: |
Fri, 10 Dec 2021 21:57:40 -0500 (EST) |
branch: externals/pyim
commit 5c4500d2b34ea3378d1adf5bbb6199a08680ed6c
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* tests/pyim-tests.el (pyim-tests-pyim-dline-parse): New test.
---
tests/pyim-tests.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 485eaea..58aae18 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -70,6 +70,17 @@
(should (equal (pyim-scheme-get-option 'wubi :class) 'xingma)))
;; ** pyim-common 相关单元测试
+(ert-deftest pyim-tests-pyim-dline-parse ()
+ (with-temp-buffer
+ (insert "ni-hao 你好")
+ (should (equal (pyim-dline-parse) '("ni-hao" "你好"))))
+ (with-temp-buffer
+ (insert "a-b-c-d")
+ (should (equal (pyim-dline-parse "-") '("a" "b" "c" "d"))))
+ (with-temp-buffer
+ (insert "你好 2")
+ (should (equal (pyim-dline-parse) '("你好" "2")))))
+
(ert-deftest pyim-tests-pyim-permutate-list ()
(should (equal (pyim-permutate-list '((a b) (c d e) (f)))
'((a c f)