diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/character-fold-tests.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/automated/character-fold-tests.el b/test/automated/character-fold-tests.el index aa2ee96a7a4..3a288b9071c 100644 --- a/test/automated/character-fold-tests.el +++ b/test/automated/character-fold-tests.el | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | 38 | ||
| 39 | (ert-deftest character-fold--test-consistency () | 39 | (ert-deftest character-fold--test-consistency () |
| 40 | (dotimes (n 100) | 40 | (dotimes (n 50) |
| 41 | (let ((w (character-fold--random-word n))) | 41 | (let ((w (character-fold--random-word n))) |
| 42 | ;; A folded string should always match the original string. | 42 | ;; A folded string should always match the original string. |
| 43 | (character-fold--test-search-with-contents w w)))) | 43 | (character-fold--test-search-with-contents w w)))) |
| @@ -57,7 +57,12 @@ | |||
| 57 | (defun character-fold--test-match-exactly (string &rest strings-to-match) | 57 | (defun character-fold--test-match-exactly (string &rest strings-to-match) |
| 58 | (let ((re (concat "\\`" (character-fold-to-regexp string) "\\'"))) | 58 | (let ((re (concat "\\`" (character-fold-to-regexp string) "\\'"))) |
| 59 | (dolist (it strings-to-match) | 59 | (dolist (it strings-to-match) |
| 60 | (should (string-match re it))))) | 60 | (should (string-match re it))) |
| 61 | ;; Case folding | ||
| 62 | (let ((case-fold-search t)) | ||
| 63 | (dolist (it strings-to-match) | ||
| 64 | (should (string-match (upcase re) (downcase it))) | ||
| 65 | (should (string-match (downcase re) (upcase it))))))) | ||
| 61 | 66 | ||
| 62 | (ert-deftest character-fold--test-some-defaults () | 67 | (ert-deftest character-fold--test-some-defaults () |
| 63 | (dolist (it '(("ffl" . "ffl") ("ffi" . "ffi") | 68 | (dolist (it '(("ffl" . "ffl") ("ffi" . "ffi") |