Mercurial > hg > xemacs-beta
comparison tests/automated/case-tests.el @ 4423:1982c8c55632
Correct and extend the previous test, thank you Stephen.
2008-02-14 Aidan Kehoe <kehoea@parhasard.net>
* automated/case-tests.el (let):
Correct and extend the previous test, thank you Stephen.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 14 Feb 2008 22:40:17 +0100 |
parents | 69b803c646cd |
children | 189fb67ca31a |
comparison
equal
deleted
inserted
replaced
4422:cb33e804774d | 4423:1982c8c55632 |
---|---|
283 (with-string-as-buffer-contents "\n\nDer beruhmte deutsche Flei\xdf\n\n" | 283 (with-string-as-buffer-contents "\n\nDer beruhmte deutsche Flei\xdf\n\n" |
284 (goto-char (point-min)) | 284 (goto-char (point-min)) |
285 (Assert (search-forward "Flei\xdf"))) | 285 (Assert (search-forward "Flei\xdf"))) |
286 | 286 |
287 (with-temp-buffer | 287 (with-temp-buffer |
288 (Assert (search-forward "M\xe9zard" nil t))) | 288 (let ((target "M\xe9zard") |
289 (debug-xemacs-searches 1)) | |
290 (Assert (not (search-forward target nil t))) | |
291 (insert target) | |
292 (goto-char (point-min)) | |
293 ;; #### search-algorithm-used is simple-search after the following, | |
294 ;; which shouldn't be necessary; it should be possible to use | |
295 ;; Boyer-Moore. | |
296 ;; | |
297 ;; But searches for ASCII strings in buffers with nothing above ?\xFF | |
298 ;; use Boyer Moore with the current implementation, which is the | |
299 ;; important thing for the Gnus use case. | |
300 (Assert (= (1+ (length target)) (search-forward target nil t))))) | |
289 | 301 |
290 (Skip-Test-Unless | 302 (Skip-Test-Unless |
291 (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS | 303 (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS |
292 "not a DEBUG_XEMACS build" | 304 "not a DEBUG_XEMACS build" |
293 "checks that the algorithm chosen by #'search-forward is relatively sane" | 305 "checks that the algorithm chosen by #'search-forward is relatively sane" |