diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/character-fold-tests.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/lisp/character-fold-tests.el b/test/lisp/character-fold-tests.el index c611217712e..dc7e9270551 100644 --- a/test/lisp/character-fold-tests.el +++ b/test/lisp/character-fold-tests.el | |||
| @@ -109,16 +109,14 @@ | |||
| 109 | (character-fold-to-regexp string))) | 109 | (character-fold-to-regexp string))) |
| 110 | (with-temp-buffer | 110 | (with-temp-buffer |
| 111 | (save-excursion (insert string)) | 111 | (save-excursion (insert string)) |
| 112 | (let ((time (time-to-seconds (current-time)))) | 112 | (let ((time (float-time))) |
| 113 | ;; Our initial implementation of case-folding in char-folding | 113 | ;; Our initial implementation of case-folding in char-folding |
| 114 | ;; created a lot of redundant paths in the regexp. Because of | 114 | ;; created a lot of redundant paths in the regexp. Because of |
| 115 | ;; that, if a really long string "almost" matches, the regexp | 115 | ;; that, if a really long string "almost" matches, the regexp |
| 116 | ;; engine took a long time to realize that it doesn't match. | 116 | ;; engine took a long time to realize that it doesn't match. |
| 117 | (should-not (character-fold-search-forward (concat string "c") nil 'noerror)) | 117 | (should-not (character-fold-search-forward (concat string "c") nil 'noerror)) |
| 118 | ;; Ensure it took less than a second. | 118 | ;; Ensure it took less than a second. |
| 119 | (should (< (- (time-to-seconds (current-time)) | 119 | (should (< (- (float-time) time) 1)))))) |
| 120 | time) | ||
| 121 | 1)))))) | ||
| 122 | 120 | ||
| 123 | (provide 'character-fold-tests) | 121 | (provide 'character-fold-tests) |
| 124 | ;;; character-fold-tests.el ends here | 122 | ;;; character-fold-tests.el ends here |