commit:     dffcabb1fe3e9bd7145211397da23e182c97d2b4
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 21 11:53:40 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Dec 21 11:54:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dffcabb1

app-shells/fish: enable py3.10, fix failing tests

we remove terminal.py pexpect test because it's
very fragile and depends on test environment

Closes: https://bugs.gentoo.org/821559
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 app-shells/fish/files/3.3.1-drop-some-tests.patch | 26 +++++++++++++++++++++++
 app-shells/fish/fish-3.3.1-r1.ebuild              | 10 ++++++++-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/app-shells/fish/files/3.3.1-drop-some-tests.patch 
b/app-shells/fish/files/3.3.1-drop-some-tests.patch
new file mode 100644
index 000000000000..4c4081d77cfa
--- /dev/null
+++ b/app-shells/fish/files/3.3.1-drop-some-tests.patch
@@ -0,0 +1,26 @@
+From ec8844d834cc9fe626e9fc326c6f5410341d532a Mon Sep 17 00:00:00 2001
+From: Fabian Homborg <[email protected]>
+Date: Thu, 14 Oct 2021 18:18:51 +0200
+Subject: [PATCH] Drop tests with resetting match start inside lookaround
+
+This seems to be of little use
+
+Fixes #8353
+---
+ src/fish_tests.cpp | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp
+index 3d71877de81..04058b47ba7 100644
+--- a/src/fish_tests.cpp
++++ b/src/fish_tests.cpp
+@@ -5723,9 +5723,6 @@ static void test_string() {
+         {{L"string", L"match", L"-r", L"-a", L"a*", L"b", 0}, STATUS_CMD_OK, 
L"\n\n"},
+         {{L"string", L"match", L"-r", L"foo\\Kbar", L"foobar", 0}, 
STATUS_CMD_OK, L"bar\n"},
+         {{L"string", L"match", L"-r", L"(foo)\\Kbar", L"foobar", 0}, 
STATUS_CMD_OK, L"bar\nfoo\n"},
+-        {{L"string", L"match", L"-r", L"(?=ab\\K)", L"ab", 0}, STATUS_CMD_OK, 
L"\n"},
+-        {{L"string", L"match", L"-r", L"(?=ab\\K)..(?=cd\\K)", L"abcd", 0}, 
STATUS_CMD_OK, L"\n"},
+-
+         {{L"string", L"replace", 0}, STATUS_INVALID_ARGS, L""},
+         {{L"string", L"replace", L"", 0}, STATUS_INVALID_ARGS, L""},
+         {{L"string", L"replace", L"", L"", 0}, STATUS_CMD_ERROR, L""},

diff --git a/app-shells/fish/fish-3.3.1-r1.ebuild 
b/app-shells/fish/fish-3.3.1-r1.ebuild
index e24e0866494f..0b5e029e2e55 100644
--- a/app-shells/fish/fish-3.3.1-r1.ebuild
+++ b/app-shells/fish/fish-3.3.1-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{7..10} )
 
 inherit cmake python-any-r1 readme.gentoo-r1
 
@@ -30,6 +30,7 @@ RESTRICT="!test? ( test )"
 PATCHES=(
        "${FILESDIR}/3.3.1-don-t-override-linker.patch"
        "${FILESDIR}/3.3.1-sbin-path-sh-test.patch"
+       "${FILESDIR}/3.3.1-drop-some-tests.patch"
 )
 
 RDEPEND="
@@ -86,6 +87,13 @@ src_install() {
 }
 
 src_test() {
+       # some tests are fragile, sanitize environment
+       local -x COLUMNS=80
+       local -X LINES=24
+
+       # very fragile, depends on terminal, size, tmux, screen and timing
+       rm -v tests/pexpects/terminal.py || die 
+
        cmake_build test
 }
 

Reply via email to