branch: externals/pyim commit 5c4500d2b34ea3378d1adf5bbb6199a08680ed6c Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@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)