!5 Fix test failure

From: @wk333 
Reviewed-by: @dwl301 
Signed-off-by: @dwl301
This commit is contained in:
openeuler-ci-bot 2022-05-09 02:52:32 +00:00 committed by Gitee
commit d044398563
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -1,10 +1,12 @@
Name: fish
Version: 3.3.1
Release: 1
Release: 2
Summary: Friendly interactive shell
License: GPLv2 and BSD and ISC and LGPLv2+ and MIT
URL: https://fishshell.com
Source0: https://github.com/fish-shell/fish-shell/releases/download/%{version}/%{name}-%{version}.tar.xz
# https://github.com/fish-shell/fish-shell/commit/ec8844d834cc9fe626e9fc326c6f5410341d532a
Patch01: fix-test-failure.patch
BuildRequires: cmake >= 3.2
BuildRequires: ninja-build
@ -97,5 +99,8 @@ fi
%{_datadir}/pixmaps/fish.png
%changelog
* Mon May 09 2022 wangkai <wangkai385@huawei.com> - 3.3.1-2
- Fix test failure
* Mon July 12 2021 wulei <wulei80@huawei.com> - 3.3.1-1
- Package init

25
fix-test-failure.patch Normal file
View File

@ -0,0 +1,25 @@
From bfe373299fc9a13f3fb05d6bc68c63e79d62dfa0 Mon Sep 17 00:00:00 2001
From: Fabian Homborg <FHomborg@gmail.com>
Date: Thu, 14 Oct 2021 18:18:51 +0200
Subject: [PATCH] Drop tests with resetting match start inside lookaround
---
src/fish_tests.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp
index 2b46986..f1f4865 100644
--- a/src/fish_tests.cpp
+++ b/src/fish_tests.cpp
@@ -5723,8 +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""},
--
2.23.0