APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1529070368 -3600
# Fri Jun 15 14:46:08 2018 +0100
# Node ID 74c1a72202b228a5847b1dd5c2a5599c79c51a98
# Parent d3562c54da0c57eee6ec619b8f9f5e9a879510af
Revise search-tests.el to work better now uppcase sharp s in case table.
tests/ChangeLog addition:
2018-06-15 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/search-tests.el:
The introduction of an uppercase sharp s to Unicode and, more
recently, to our case tables, has changed the logic of when
Boyer-Moore versus simple search for the particular search strings
in this file. Update it.
diff -r d3562c54da0c -r 74c1a72202b2 tests/ChangeLog
--- a/tests/ChangeLog Thu Jun 14 12:17:53 2018 +0100
+++ b/tests/ChangeLog Fri Jun 15 14:46:08 2018 +0100
@@ -1,3 +1,11 @@
+2018-06-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/search-tests.el:
+ The introduction of an uppercase sharp s to Unicode and, more
+ recently, to our case tables, has changed the logic of when
+ Boyer-Moore versus simple search for the particular search strings
+ in this file. Update it.
+
2018-06-14 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el:
diff -r d3562c54da0c -r 74c1a72202b2 tests/automated/search-tests.el
--- a/tests/automated/search-tests.el Thu Jun 14 12:17:53 2018 +0100
+++ b/tests/automated/search-tests.el Fri Jun 15 14:46:08 2018 +0100
@@ -188,26 +188,30 @@
(goto-char (point-min))
(Assert (search-forward "Fleiss"))
(delete-region (point-min) (point-max))
- (insert "\n\nDer ber\xfchmte deutsche Flei\xdf\n\n")
+ (insert "\n\nDer ber\xfchmte \u00BBdeutsche\u00AB Flei\xdf\n\n")
(goto-char (point-min))
- (Assert (search-forward "Flei\xdf"))
- (Assert (eq 'boyer-moore search-algorithm-used))
+ (Assert (search-forward "\u00BBdeutsche\u00AB"))
+ (Assert (eq 'boyer-moore search-algorithm-used)
+ "Boyer-Moore not used with a Latin-1 buffer")
(delete-region (point-min) (point-max))
(when (featurep 'mule)
- (insert "\n\nDer ber\xfchmte deutsche Flei\xdf\n\n")
+ (insert "\n\nDer ber\xfchmte deutsche Fleiss\n\n")
(goto-char (point-min))
(Assert
- (search-forward (format "Fle%c\xdf"
+ (search-forward (format "Fle%css"
(make-char 'latin-iso8859-9 #xfd))))
- (Assert (eq 'boyer-moore search-algorithm-used))
+ (Assert
+ (eq 'boyer-moore search-algorithm-used)
+ "Boyer-Moore not used with a Latin-1 buffer, Latin-9 search string")
(insert (make-char 'latin-iso8859-9 #xfd))
(goto-char (point-min))
- (Assert (search-forward "Flei\xdf"))
- (Assert (eq 'simple-search search-algorithm-used))
+ (Assert (search-forward "Fleiss"))
+ (Assert (eq 'simple-search search-algorithm-used))
(goto-char (point-min))
- (Assert (search-forward (format "Fle%c\xdf"
+ (Assert (search-forward (format "Fle%css"
(make-char 'latin-iso8859-9 #xfd))))
- (Assert (eq 'simple-search search-algorithm-used))
+ (Assert (eq 'simple-search search-algorithm-used)
+ "simple search not used with a Latin 9 dotless i, case equivalents with
differing byte lengths")
(setq newcase (copy-case-table (standard-case-table)))
(put-case-table-pair (make-char 'ethiopic #x23 #x23)
(make-char 'ethiopic #x23 #x25)
@@ -227,13 +231,15 @@
(string (make-char 'ethiopic #x23 #x25))
nil t)
3))
- (Assert (eq 'simple-search search-algorithm-used))
+ (Assert (eq 'simple-search search-algorithm-used)
+ "simple search not used with multidimensional character with case and repeated
octets")
(goto-char (point-min))
(Assert (eql (search-forward
(string (make-char 'ethiopic #x23 #x27))
nil t)
nil))
- (Assert (eq 'boyer-moore search-algorithm-used)))))))
+ (Assert (eq 'boyer-moore search-algorithm-used)
+ "Boyer-Moore not used with multidimensional character with no repeated octets and
no case"))))))
;; XEmacs bug of long standing.
@@ -241,3 +247,5 @@
(insert "foo\201bar")
(goto-char (point-min))
(Assert (eq (search-forward "\201" nil t) 5)))
+
+;; end of search-tests.el
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
Show replies by date