]> code.delx.au - gnu-emacs-elpa/blobdiff - test/frontends-tests.el
company--create-lines: Handle keep-prefix with multiple-width chars in prefix
[gnu-emacs-elpa] / 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