]> code.delx.au - gnu-emacs-elpa/blobdiff - test/frontends-tests.el
company-dabbrev--search-buffer: Speed up
[gnu-emacs-elpa] / test / frontends-tests.el
index 2535f3ee0a16f938a4c1d0d710ed3aed36de861b..7b8ee611dcd23f62c552f756651d6580bd253d11 100644 (file)
@@ -1,6 +1,6 @@
 ;;; frontends-tests.el --- company-mode tests  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015  Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2016  Free Software Foundation, Inc.
 
 ;; Author: Dmitry Gutov
 
         (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)