Fix hi-lock AOT test failures (bug#51308)
This commit is contained in:
parent
8002fcd4b9
commit
8f42ff31f6
1 changed files with 10 additions and 5 deletions
|
@ -31,7 +31,8 @@
|
|||
(with-temp-buffer
|
||||
(insert "a A b B\n")
|
||||
(cl-letf (((symbol-function 'completing-read)
|
||||
(lambda (_prompt _coll _x _y _z _hist defaults)
|
||||
(lambda (_prompt _coll
|
||||
&optional _x _y _z _hist defaults _inherit)
|
||||
(car defaults))))
|
||||
(dotimes (_ 2)
|
||||
(let ((face (hi-lock-read-face-name)))
|
||||
|
@ -43,7 +44,8 @@
|
|||
(with-temp-buffer
|
||||
(insert "foo bar")
|
||||
(cl-letf (((symbol-function 'completing-read)
|
||||
(lambda (_prompt _coll _x _y _z _hist defaults)
|
||||
(lambda (_prompt _coll
|
||||
&optional _x _y _z _hist defaults _inherit)
|
||||
(car defaults))))
|
||||
(hi-lock-set-pattern "9999" (hi-lock-read-face-name)) ; No match
|
||||
(hi-lock-set-pattern "foo" (hi-lock-read-face-name)))
|
||||
|
@ -89,7 +91,8 @@
|
|||
(let ((search-spaces-regexp search-whitespace-regexp)) (highlight-regexp "a a"))
|
||||
(should (= (length (overlays-in (point-min) (point-max))) 1))
|
||||
(cl-letf (((symbol-function 'completing-read)
|
||||
(lambda (_prompt _coll _x _y _z _hist defaults)
|
||||
(lambda (_prompt _coll
|
||||
&optional _x _y _z _hist defaults _inherit)
|
||||
(car defaults))))
|
||||
(call-interactively 'unhighlight-regexp))
|
||||
(should (= (length (overlays-in (point-min) (point-max))) 0))
|
||||
|
@ -142,7 +145,8 @@
|
|||
(font-lock-ensure)
|
||||
(should (memq 'hi-yellow (get-text-property 1 'face)))
|
||||
(cl-letf (((symbol-function 'completing-read)
|
||||
(lambda (_prompt _coll _x _y _z _hist defaults)
|
||||
(lambda (_prompt _coll
|
||||
&optional _x _y _z _hist defaults _inherit)
|
||||
(car defaults)))
|
||||
(font-lock-fontified t))
|
||||
(call-interactively 'unhighlight-regexp))
|
||||
|
@ -155,7 +159,8 @@
|
|||
(insert "aAbB\n")
|
||||
|
||||
(cl-letf (((symbol-function 'completing-read)
|
||||
(lambda (_prompt _coll _x _y _z _hist defaults)
|
||||
(lambda (_prompt _coll
|
||||
&optional _x _y _z _hist defaults _inherit)
|
||||
(car defaults))))
|
||||
|
||||
(highlight-regexp "a")
|
||||
|
|
Loading…
Add table
Reference in a new issue