[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim ebded0b: * tests/pyim-tests.el (pyim-tests-pyim-st
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim ebded0b: * tests/pyim-tests.el (pyim-tests-pyim-string-distance): New test. |
Date: |
Fri, 10 Dec 2021 22:57:28 -0500 (EST) |
branch: externals/pyim
commit ebded0b42fce44187ac8a1364244c471872e9449
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
* tests/pyim-tests.el (pyim-tests-pyim-string-distance): New test.
---
tests/pyim-tests.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 4196dff..2de6d67 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -116,6 +116,15 @@
'("a-b-c-d" "a-b-c" "a-b")))
(should (equal (pyim-subconcat nil) nil)))
+(ert-deftest pyim-tests-pyim-string-distance ()
+ (should (equal (pyim-string-distance "nihaoma" "nihaoma") 0))
+ (should (equal (pyim-string-distance "nihaoma" "nhm") 4))
+ (should (equal (pyim-string-distance "nihaoma" "niham") 2))
+ (should (equal (pyim-string-distance "nihaoma" "nbm") 5))
+ (should (equal (pyim-string-distance "nihaoma" "wbc") 7))
+ (should (equal (pyim-string-distance "nihaoma" "ni") 5))
+ (should (equal (pyim-string-distance "nihaoma" "ci") 6)))
+
(ert-deftest pyim-tests-pyim-add-unread-command-events ()
(let ((unread-command-events nil))
(pyim-add-unread-command-events ?a)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/pyim ebded0b: * tests/pyim-tests.el (pyim-tests-pyim-string-distance): New test.,
ELPA Syncer <=