diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-04-28 10:27:53 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-04-28 10:27:53 +0300 |
commit | a7a3918a16c85f89d797d48b09e751ab30e0f032 (patch) | |
tree | a48809d67e91a60cbdb622f6a4145c8081d4bb1c /test/lisp/subr-tests.el | |
parent | c6e6503900534d939dd94b812563c27f22c49b7d (diff) | |
download | emacs-a7a3918a16c85f89d797d48b09e751ab30e0f032.tar.gz emacs-a7a3918a16c85f89d797d48b09e751ab30e0f032.tar.bz2 emacs-a7a3918a16c85f89d797d48b09e751ab30e0f032.zip |
Fix documentation and tests for 'string-distance'
* src/fns.c (Fstring_distance): Doc fix.
* doc/lispref/strings.texi (Text Comparison): Document
'string-distance'.
* etc/NEWS: Fix wording and mark as documented in the manuals.
* test/src/fns-tests.el (test-string-distance): Move from
subr-tests.el and rename.
Diffstat (limited to 'test/lisp/subr-tests.el')
-rw-r--r-- | test/lisp/subr-tests.el | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 6b80c743a05..52b61d9fb97 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -281,24 +281,6 @@ indirectly `mapbacktrace'." (should (equal (string-match-p "\\`[[:blank:]]\\'" "\u3000") 0)) (should-not (string-match-p "\\`[[:blank:]]\\'" "\N{LINE SEPARATOR}"))) -(ert-deftest subr-tests--string-distance () - "Test `string-distance' behavior." - ;; ASCII characters are always fine - (should (equal 1 (string-distance "heelo" "hello"))) - (should (equal 2 (string-distance "aeelo" "hello"))) - (should (equal 0 (string-distance "ab" "ab" t))) - (should (equal 1 (string-distance "ab" "abc" t))) - - ;; string containing hanzi character, compare by byte - (should (equal 6 (string-distance "ab" "ab我她" t))) - (should (equal 3 (string-distance "ab" "a我b" t))) - (should (equal 3 (string-distance "我" "她" t))) - - ;; string containing hanzi character, compare by character - (should (equal 2 (string-distance "ab" "ab我她"))) - (should (equal 1 (string-distance "ab" "a我b"))) - (should (equal 1 (string-distance "我" "她")))) - (ert-deftest subr-tests--dolist--wrong-number-of-args () "Test that `dolist' doesn't accept wrong types or length of SPEC, cf. Bug#25477." |