]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/company/test/frontends-tests.el
Merge commit 'a4ac0dead8e9cb440c1f8aec9141d6c64bad4933' from company
[gnu-emacs-elpa] / packages / company / test / frontends-tests.el
index a10f91461f2c6ef2a4e65640ef97c8a08a8091d7..35c94c95e52e7628198af0d89e5644bb6d68372c 100644 (file)
                      " 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-column-with-composition ()
   :tags '(interactive)
   (with-temp-buffer