commit: e26387dc3e285adb877d7243f20ed308baf9c4b1 Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> AuthorDate: Thu Jul 27 08:10:57 2023 +0000 Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> CommitDate: Thu Jul 27 08:28:45 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e26387dc
app-emacs/rust-mode: fix tests Closes: https://bugs.gentoo.org/911302 Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org> .../rust-mode/files/rust-mode-1.0.5-tests.patch | 36 ++++++++++++++++++++++ app-emacs/rust-mode/rust-mode-1.0.5.ebuild | 8 ++--- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/app-emacs/rust-mode/files/rust-mode-1.0.5-tests.patch b/app-emacs/rust-mode/files/rust-mode-1.0.5-tests.patch new file mode 100644 index 000000000000..a7cbe494438e --- /dev/null +++ b/app-emacs/rust-mode/files/rust-mode-1.0.5-tests.patch @@ -0,0 +1,36 @@ +From 8e85850cdba5cbe265d974e63b84b54a9bc9133e Mon Sep 17 00:00:00 2001 +From: Philipp Stephani <[email protected]> +Date: Wed, 26 Apr 2023 10:27:30 +0200 +Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20duplicate=20test=20name.?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Emacs 29 will signal an error in this case in batch mode, and in any case the +first test in the duplicate series will never run. +--- + rust-mode-tests.el | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rust-mode-tests.el b/rust-mode-tests.el +index c1d0501..3b23046 100644 +--- a/rust-mode-tests.el ++++ b/rust-mode-tests.el +@@ -2797,7 +2797,7 @@ fn foo<T:Fn() -> X<Y>>() -> Z { + ) + )) + +-(ert-deftest rust-test-paren-matching-lt-ops-in-fn-params () ++(ert-deftest rust-test-paren-matching-lt-ops-in-fn-params-1 () + (rust-test-matching-parens + " + fn foo(x:i32) { +@@ -2809,7 +2809,7 @@ fn foo(x:i32) { + ) + )) + +-(ert-deftest rust-test-paren-matching-lt-ops-in-fn-params () ++(ert-deftest rust-test-paren-matching-lt-ops-in-fn-params-2 () + (rust-test-matching-parens + " + fn foo(x:i32) -> bool { diff --git a/app-emacs/rust-mode/rust-mode-1.0.5.ebuild b/app-emacs/rust-mode/rust-mode-1.0.5.ebuild index d0c6b3b2bf95..70637f21a50c 100644 --- a/app-emacs/rust-mode/rust-mode-1.0.5.ebuild +++ b/app-emacs/rust-mode/rust-mode-1.0.5.ebuild @@ -13,11 +13,9 @@ LICENSE="|| ( MIT Apache-2.0 )" SLOT="0" KEYWORDS="~amd64 ~x86" +PATCHES=( "${FILESDIR}"/${P}-tests.patch ) + DOCS=( README.md ) SITEFILE="50${PN}-gentoo.el" -src_test() { - ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} \ - -l rust-mode.el -l rust-mode-tests.el \ - -f ert-run-tests-batch-and-exit || die "tests failed" -} +elisp-enable-tests ert "${S}" -l ${PN}-tests.el
