comparison tests/automated/case-tests.el @ 4421:69b803c646cd

Fail searches immediately if searching for non-representable characters. 2008-02-11 Aidan Kehoe <kehoea@parhasard.net> * search.c (search_buffer): In the event that a character is not representable in the buffer, fail immediately. Prevents an assertion failure in the code to deal with whether Boyer-Moore search can be used for such characters. 2008-02-11 Aidan Kehoe <kehoea@parhasard.net> * automated/case-tests.el (Assert): New test case; thank you Michael Sperber.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 11 Feb 2008 22:34:51 +0100
parents bceb3e285ae7
children 1982c8c55632
comparison
equal deleted inserted replaced
4419:eb82fbb675ea 4421:69b803c646cd
281 ;; Bug reported in http://mid.gmane.org/y9lk5lu5orq.fsf@deinprogramm.de from 281 ;; Bug reported in http://mid.gmane.org/y9lk5lu5orq.fsf@deinprogramm.de from
282 ;; Michael Sperber. Fixed 2008-01-29. 282 ;; Michael Sperber. Fixed 2008-01-29.
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
287 (with-temp-buffer
288 (Assert (search-forward "M\xe9zard" nil t)))
286 289
287 (Skip-Test-Unless 290 (Skip-Test-Unless
288 (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS 291 (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS
289 "not a DEBUG_XEMACS build" 292 "not a DEBUG_XEMACS build"
290 "checks that the algorithm chosen by #'search-forward is relatively sane" 293 "checks that the algorithm chosen by #'search-forward is relatively sane"