" b ︸︸ ")
(company--create-lines 0 999)))))
+(ert-deftest company-create-lines-with-multiple-width-and-keep-prefix ()
+ :tags '(interactive)
+ (let* (company-show-numbers
+ (company-candidates '("MIRAI発売1カ月"
+ "MIRAI発売2カ月"))
+ (company-candidates-length 2)
+ (company-prefix "MIRAI発")
+ (company-backend (lambda (c &optional _arg)
+ (pcase c
+ (`ignore-case 'keep-prefix)))))
+ (should (equal '(" MIRAI発売1カ月 "
+ " MIRAI発売2カ月 ")
+ (company--create-lines 0 999)))))
+
+(ert-deftest company-fill-propertize-truncates-search-highlight ()
+ (let ((company-search-string "foo")
+ (company-backend #'ignore)
+ (company-prefix ""))
+ (should (equal-including-properties
+ (company-fill-propertize "barfoo" nil 6 t nil nil)
+ #("barfoo"
+ 0 3 (face company-tooltip mouse-face company-tooltip-mouse)
+ 3 6 (face company-tooltip-search mouse-face company-tooltip-mouse))))
+ (should (equal-including-properties
+ (company-fill-propertize "barfoo" nil 5 t "" " ")
+ #("barfo "
+ 0 3 (face company-tooltip mouse-face company-tooltip-mouse)
+ 3 5 (face company-tooltip-search mouse-face company-tooltip-mouse)
+ 5 6 (face company-tooltip mouse-face company-tooltip-mouse))))
+ (should (equal-including-properties
+ (company-fill-propertize "barfoo" nil 3 t " " " ")
+ #(" bar "
+ 0 5 (face company-tooltip mouse-face company-tooltip-mouse))))))
+
(ert-deftest company-column-with-composition ()
:tags '(interactive)
(with-temp-buffer