(company-prefix "")
(str1 (propertize "str1" 'face 'foo))
(str2 (propertize "str2" 'face 'foo)))
- (equal-including-properties
- (company-fill-propertize str1 str2 8 nil nil nil)
- #("str1str2"
- 0 4 (face company-tooltip mouse-face company-tooltip-mouse)
- 4 8 (face company-tooltip-annotation mouse-face company-tooltip-mouse)))))
+ (should (ert-equal-including-properties
+ (company-fill-propertize str1 str2 8 nil nil nil)
+ #("str1str2"
+ 0 4 (face (company-tooltip) mouse-face (company-tooltip-mouse))
+ 4 8 (face (company-tooltip-annotation company-tooltip)
+ mouse-face (company-tooltip-mouse)))))))
(ert-deftest company-fill-propertize-delegates-to-pre-render ()
(let ((company-backend
(str1 (propertize "str1" 'foo 'bar))
(str2 (propertize "str2" 'foo 'bar)))
(let ((res (company-fill-propertize str1 str2 8 nil nil nil)))
+ ;; Could use `ert-equal-including-properties' as well.
(should (eq (get-text-property 0 'foo res) 'bar))
(should (eq (get-text-property 4 'foo res) 'bar))
(should (equal (get-text-property 0 'face res)