[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 299e606435: Don't use ert-equal-including-prope
From: |
ELPA Syncer |
Subject: |
[elpa] externals/company 299e606435: Don't use ert-equal-including-properties with Emacs 29+ |
Date: |
Sat, 19 Mar 2022 19:57:23 -0400 (EDT) |
branch: externals/company
commit 299e606435f589aa3024daadb7c249940ed8c36a
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Don't use ert-equal-including-properties with Emacs 29+
It's been obsoleted.
---
company-tests.el | 6 ++++++
test/capf-tests.el | 6 +++---
test/core-tests.el | 3 ++-
test/frontends-tests.el | 12 ++++++------
4 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/company-tests.el b/company-tests.el
index 7859e9315b..1943ba5a29 100644
--- a/company-tests.el
+++ b/company-tests.el
@@ -20,6 +20,7 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
(require 'company)
+(require 'ert)
(defvar company-dir (file-name-directory (or load-file-name
buffer-file-name)))
@@ -36,4 +37,9 @@
(let ((this-command command))
(run-hooks 'post-command-hook))))
+(defalias 'company--equal-including-properties
+ (if (version< "29" emacs-version)
+ 'equal-including-properties
+ 'ert-equal-including-properties))
+
(provide 'company-tests)
diff --git a/test/capf-tests.el b/test/capf-tests.el
index 4136a3b243..b222955d97 100644
--- a/test/capf-tests.el
+++ b/test/capf-tests.el
@@ -81,7 +81,7 @@
;; remove text properties that aren't relevant to our test
(company--remove-but-these-properties render '(face))
(should
- (ert-equal-including-properties
+ (company--equal-including-properties
render
#("with-current-buffer"
0 5 (face (company-tooltip-common company-tooltip)) ; "with"
@@ -111,7 +111,7 @@
;; remove text properties that aren't relevant to our test
(company--remove-but-these-properties render '(face))
(should
- (ert-equal-including-properties
+ (company--equal-including-properties
render
#("with-current-buffer"
0 1 (face (company-tooltip-common company-tooltip)) ; "w"
@@ -135,7 +135,7 @@
;; remove text properties that aren't relevant to our test
(company--remove-but-these-properties render '(face))
(should
- (ert-equal-including-properties
+ (company--equal-including-properties
render
#("with-current-buffer"
0 14 (face (company-tooltip-common company-tooltip));
"with-current-b"
diff --git a/test/core-tests.el b/test/core-tests.el
index 05c33eac5e..4a6cf0b8af 100644
--- a/test/core-tests.el
+++ b/test/core-tests.el
@@ -497,9 +497,10 @@
(defvar ct-sorted nil)
+;; FIXME: When Emacs 29+ only: just replace with equal-including-properties.
(defun ct-equal-including-properties (list1 list2)
(or (and (not list1) (not list2))
- (and (ert-equal-including-properties (car list1) (car list2))
+ (and (company--equal-including-properties (car list1) (car list2))
(ct-equal-including-properties (cdr list1) (cdr list2)))))
(ert-deftest company-strips-duplicates-returns-nil ()
diff --git a/test/frontends-tests.el b/test/frontends-tests.el
index 3836a02f6f..5e5d9bb96a 100644
--- a/test/frontends-tests.el
+++ b/test/frontends-tests.el
@@ -274,7 +274,7 @@
(company-format-margin-function (lambda (_candidate _selected)
"X"))
(company-backend (lambda (c &rest _) (pcase c (`kind 'class)))))
- (should (ert-equal-including-properties
+ (should (company--equal-including-properties
(cadr (company--create-lines 0 999))
#("XArrayLi " 0 9
(face (company-tooltip-selection company-tooltip)
@@ -308,18 +308,18 @@
(let ((company-search-string "foo")
(company-backend #'ignore)
(company-prefix ""))
- (should (ert-equal-including-properties
+ (should (company--equal-including-properties
(company-fill-propertize "barfoo" nil 6 t nil nil)
#("barfoo"
0 3 (face (company-tooltip-selection company-tooltip)
mouse-face (company-tooltip-mouse))
3 6 (face (company-tooltip-search-selection
company-tooltip-selection company-tooltip) mouse-face
(company-tooltip-mouse)))))
- (should (ert-equal-including-properties
+ (should (company--equal-including-properties
(company-fill-propertize "barfoo" nil 5 t "" " ")
#("barfo "
0 3 (face (company-tooltip-selection company-tooltip)
mouse-face (company-tooltip-mouse))
3 5 (face (company-tooltip-search-selection
company-tooltip-selection company-tooltip) mouse-face (company-tooltip-mouse))
5 6 (face (company-tooltip-selection company-tooltip)
mouse-face (company-tooltip-mouse)))))
- (should (ert-equal-including-properties
+ (should (company--equal-including-properties
(company-fill-propertize "barfoo" nil 3 t " " " ")
#(" bar "
0 5 (face (company-tooltip-selection company-tooltip)
mouse-face (company-tooltip-mouse)))))))
@@ -328,7 +328,7 @@
(let ((company-search-string "foo")
(company-backend (lambda (c &rest _) (pcase c (`deprecated t))))
(company-prefix ""))
- (should (ert-equal-including-properties
+ (should (company--equal-including-properties
(company-fill-propertize "barfoo" nil 5 t "" " ")
#("barfo "
0 3 (face (company-tooltip-selection company-tooltip-deprecated
company-tooltip) mouse-face (company-tooltip-mouse))
@@ -340,7 +340,7 @@
(company-prefix "")
(str1 (propertize "str1" 'face 'foo))
(str2 (propertize "str2" 'face 'foo)))
- (should (ert-equal-including-properties
+ (should (company--equal-including-properties
(company-fill-propertize str1 str2 8 nil nil nil)
#("str1str2"
0 4 (face company-tooltip mouse-face (company-tooltip-mouse))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/company 299e606435: Don't use ert-equal-including-properties with Emacs 29+,
ELPA Syncer <=