!23 修复在grep 3.8 下测试用例失败问题

From: @caojingbo 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2023-01-31 02:31:44 +00:00 committed by Gitee
commit bacc79c480
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,72 @@
diff -Naur a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst
--- a/Test/D07multibyte.ztst 2022-05-08 14:18:22.000000000 +0800
+++ b/Test/D07multibyte.ztst 2023-01-30 16:26:37.480018635 +0800
@@ -6,7 +6,7 @@
unset -m LC_\*
mb_ok=
langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
for LANG in $langs; do
if [[ é = ? ]]; then
mb_ok=1
diff -Naur a/Test/E01options.ztst b/Test/E01options.ztst
--- a/Test/E01options.ztst 2022-05-08 14:18:22.000000000 +0800
+++ b/Test/E01options.ztst 2023-01-30 16:26:37.481018640 +0800
@@ -651,7 +651,7 @@
>noktarg1
>0 1
- showopt() { setopt | egrep 'localoptions|ksharrays'; }
+ showopt() { setopt | grep -E 'localoptions|ksharrays'; }
f1() { setopt localoptions ksharrays; showopt }
f2() { setopt ksharrays; showopt }
setopt kshoptionprint
diff -Naur a/Test/V07pcre.ztst b/Test/V07pcre.ztst
--- a/Test/V07pcre.ztst 2022-05-08 14:18:22.000000000 +0800
+++ b/Test/V07pcre.ztst 2023-01-30 16:26:37.488018676 +0800
@@ -12,7 +12,7 @@
unset -m LC_\*
mb_ok=
langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
for LANG in $langs; do
if [[ é = ? ]]; then
mb_ok=1
diff -Naur a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst
--- a/Test/X02zlevi.ztst 2022-05-08 14:18:22.000000000 +0800
+++ b/Test/X02zlevi.ztst 2023-01-30 16:26:37.492018696 +0800
@@ -4,7 +4,7 @@
unset -m LC_\*
ZSH_TEST_LANG=
langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
for LANG in $langs; do
if [[ é = ? ]]; then
ZSH_TEST_LANG=$LANG
diff -Naur a/Test/X03zlebindkey.ztst b/Test/X03zlebindkey.ztst
--- a/Test/X03zlebindkey.ztst 2022-05-08 14:18:22.000000000 +0800
+++ b/Test/X03zlebindkey.ztst 2023-01-30 16:26:37.492018696 +0800
@@ -6,7 +6,7 @@
unset -m LC_\*
ZSH_TEST_LANG=
langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
for LANG in $langs; do
if [[ é = ? ]]; then
ZSH_TEST_LANG=$LANG
diff -Naur a/Test/Y01completion.ztst b/Test/Y01completion.ztst
--- a/Test/Y01completion.ztst 2022-05-08 14:18:22.000000000 +0800
+++ b/Test/Y01completion.ztst 2023-01-30 16:26:37.493018701 +0800
@@ -4,7 +4,7 @@
unset -m LC_\*
ZSH_TEST_LANG=
langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8'))
+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8'))
for LANG in $langs; do
if [[ é = ? ]]; then
ZSH_TEST_LANG=$LANG

View File

@ -2,7 +2,7 @@
Name: zsh Name: zsh
Version: 5.9 Version: 5.9
Release: 2 Release: 3
Summary: A shell designed for interactive use Summary: A shell designed for interactive use
License: MIT License: MIT
URL: http://zsh.sourceforge.net URL: http://zsh.sourceforge.net
@ -16,6 +16,7 @@ Source3: zprofile
Source4: zshrc Source4: zshrc
Source5: zshenv Source5: zshenv
Source6: dotzshrc Source6: dotzshrc
Patch0: zsh-5.9-fix-egrep-test-error.patch
BuildRequires: autoconf coreutils gawk gdbm-devel libcap-devel make BuildRequires: autoconf coreutils gawk gdbm-devel libcap-devel make
BuildRequires: ncurses-devel pcre-devel sed texinfo hostname gcc BuildRequires: ncurses-devel pcre-devel sed texinfo hostname gcc
@ -128,6 +129,9 @@ fi
%{_infodir}/* %{_infodir}/*
%changelog %changelog
* Mon Jan 30 2023 Cao Jingbo <caojb@chinatelecom.cn> - 5.9-3
- Fix when use grep 3.8 build error.
* Tue Jan 17 2023 dillon chen < dillon.chen@gmail.com> - 5.9-2 * Tue Jan 17 2023 dillon chen < dillon.chen@gmail.com> - 5.9-2
- /usr/local/bin/zsh => /bin/zsh - /usr/local/bin/zsh => /bin/zsh