commit:     b7df8cd59988ffaa1827918fd959674f768c631c
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 20 20:40:48 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sat Jan 20 20:45:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7df8cd5

app-emacs/rainbow-delimiters: remove failing test

Closes: https://bugs.gentoo.org/911301
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 .../files/rainbow-delimiters-2.1.5-test.patch      | 26 ++++++++++++++++++++++
 .../rainbow-delimiters-2.1.5.ebuild                | 24 +++++++++++++-------
 2 files changed, 42 insertions(+), 8 deletions(-)

diff --git 
a/app-emacs/rainbow-delimiters/files/rainbow-delimiters-2.1.5-test.patch 
b/app-emacs/rainbow-delimiters/files/rainbow-delimiters-2.1.5-test.patch
new file mode 100644
index 000000000000..43f1cd566f2e
--- /dev/null
+++ b/app-emacs/rainbow-delimiters/files/rainbow-delimiters-2.1.5-test.patch
@@ -0,0 +1,26 @@
+diff --git a/rainbow-delimiters-test.el.orig b/rainbow-delimiters-test.el
+index 4683a9e..6a6f677 100644
+--- a/rainbow-delimiters-test.el.orig
++++ b/rainbow-delimiters-test.el
+@@ -141,21 +141,6 @@
+                  9 10 (face (rainbow-delimiters-depth-2-face))
+                  10 11 (face (rainbow-delimiters-depth-1-face))))))))
+ 
+-(ert-deftest highlights-all-delimiters ()
+-  (with-temp-buffer-in-mode 'c++-mode
+-    (with-string (str "foo<int> x;")
+-      (should (ert-equal-including-properties
+-               (progn
+-                 (remove-list-of-text-properties
+-                  (point-min) (point-max) '(category c-type syntax-table))
+-                 (buffer-string))
+-               #("foo<int> x;"
+-                 0 3 (face font-lock-type-face)
+-                 3 4 (face (rainbow-delimiters-depth-1-face))
+-                 4 7 (face font-lock-type-face)
+-                 7 8 (face (rainbow-delimiters-depth-1-face))
+-                 9 10 (face font-lock-variable-name-face)))))))
+-
+ (ert-deftest doesnt-higlight-nondelimiters-1 ()
+   (should-do-nothing 'text-mode "foo"))
+ 

diff --git a/app-emacs/rainbow-delimiters/rainbow-delimiters-2.1.5.ebuild 
b/app-emacs/rainbow-delimiters/rainbow-delimiters-2.1.5.ebuild
index 79817d9fb51f..de3e3f172a3c 100644
--- a/app-emacs/rainbow-delimiters/rainbow-delimiters-2.1.5.ebuild
+++ b/app-emacs/rainbow-delimiters/rainbow-delimiters-2.1.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -7,11 +7,22 @@ inherit elisp readme.gentoo-r1
 
 DESCRIPTION="Highlight nested parentheses, brackets, and braces according to 
their depth"
 HOMEPAGE="https://github.com/Fanael/rainbow-delimiters/";
-SRC_URI="https://github.com/Fanael/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+if [[ "${PV}" == *9999* ]] ; then
+       inherit git-r3
+
+       EGIT_REPO_URI="https://github.com/Fanael/${PN}.git";
+else
+       SRC_URI="https://github.com/Fanael/${PN}/archive/${PV}.tar.gz
+               -> ${P}.tar.gz"
+
+       KEYWORDS="amd64 ~x86"
+fi
 
 LICENSE="GPL-3+"
 SLOT="0"
-KEYWORDS="amd64 ~x86"
+
+PATCHES=( "${FILESDIR}/${PN}-2.1.5-test.patch"  )
 
 SITEFILE="50${PN}-gentoo.el"
 DOC_CONTENTS="To start the mode automatically in foo-mode,
@@ -21,13 +32,10 @@ DOC_CONTENTS="To start the mode automatically in foo-mode,
        (Emacs 24 and above):
        \n\t(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)"
 
-src_test() {
-       # EMACS_VERSION is for GitHub CI, it can be left blank
-       EMACS_VERSION="" sh ./run-tests.sh || die
-}
+elisp-enable-tests ert .
 
 src_install() {
-       elisp-install ${PN} ${PN}.el{,c}
+       elisp-install "${PN}" ${PN}.el{,c}
        elisp-site-file-install "${FILESDIR}/${SITEFILE}"
 
        einstalldocs

Reply via email to