[3/3] t5520: avoid alternation in grep's BRE (not POSIX)
diff mbox series

Message ID 20200520034444.47932-4-carenas@gmail.com
State New
Headers show
Series
  • openbsd: fixes for 2.27.0-RC0
Related show

Commit Message

Carlo Marcelo Arenas Belón May 20, 2020, 3:44 a.m. UTC
Instead of using a BRE, that broke tests 30-32, 37-39, 42 at least with
OpenBSD 6.7; use a simpler ERE.

Fixes: d9f15d37f1 (pull: pass --autostash to merge, 2020-04-07)
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 t/t5520-pull.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Junio C Hamano May 20, 2020, 2:58 p.m. UTC | #1
Carlo Marcelo Arenas Belón  <carenas@gmail.com> writes:

> Instead of using a BRE, that broke tests 30-32, 37-39, 42 at least with
> OpenBSD 6.7; use a simpler ERE.

Thanks.  We already do use "test_i18ngrep -E" in another test, so
this should be safe.

> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
>  t/t5520-pull.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
> index 37535d63a9..9fae07cdfa 100755
> --- a/t/t5520-pull.sh
> +++ b/t/t5520-pull.sh
> @@ -28,7 +28,7 @@ test_pull_autostash_fail () {
>  	echo dirty >new_file &&
>  	git add new_file &&
>  	test_must_fail git pull "$@" . copy 2>err &&
> -	test_i18ngrep "\(uncommitted changes.\)\|\(overwritten by merge:\)" err
> +	test_i18ngrep -E "uncommitted changes.|overwritten by merge:" err
>  }
>  
>  test_expect_success setup '

Patch
diff mbox series

diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 37535d63a9..9fae07cdfa 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -28,7 +28,7 @@  test_pull_autostash_fail () {
 	echo dirty >new_file &&
 	git add new_file &&
 	test_must_fail git pull "$@" . copy 2>err &&
-	test_i18ngrep "\(uncommitted changes.\)\|\(overwritten by merge:\)" err
+	test_i18ngrep -E "uncommitted changes.|overwritten by merge:" err
 }
 
 test_expect_success setup '