diff 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
line wrap: on
line diff
--- a/tests/automated/case-tests.el	Tue Feb 12 21:54:27 2008 +0100
+++ b/tests/automated/case-tests.el	Thu Feb 14 22:40:17 2008 +0100
@@ -285,7 +285,19 @@
   (Assert (search-forward "Flei\xdf")))
 
 (with-temp-buffer
-  (Assert (search-forward "M\xe9zard" nil t)))
+  (let ((target "M\xe9zard")
+        (debug-xemacs-searches 1))
+    (Assert (not (search-forward target nil t)))
+    (insert target)
+    (goto-char (point-min))
+    ;; #### search-algorithm-used is simple-search after the following,
+    ;; which shouldn't be necessary; it should be possible to use
+    ;; Boyer-Moore. 
+    ;;
+    ;; But searches for ASCII strings in buffers with nothing above ?\xFF
+    ;; use Boyer Moore with the current implementation, which is the
+    ;; important thing for the Gnus use case.
+    (Assert (= (1+ (length target)) (search-forward target nil t)))))
 
 (Skip-Test-Unless
  (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS