threads / patch / 57110

patcht4202: fix patternType setting in --invert-grep test

Subject: [PATCH] t4202: fix patternType setting in --invert-grep test

## tl;dr

2 messages between Dec 17, 2021 and Dec 18, 2021. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

René Scharfe· Dec 17, 2021, 16:48 UTC · lore
Actually use extended regexes as indicated in the comment.
Signed-off-by: René Scharfe <l.s.r@web.de>
---
 t/t4202-log.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to t/t4202-log.sh +1 −2
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 7884e3d46b..f51b57b4a2 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -250,7 +250,7 @@ test_expect_success 'log --invert-grep --grep' '
 	test_cmp expect actual &&

 	# POSIX extended
-	git -c grep.patternType=basic log --pretty="tformat:%s" --invert-grep --grep=t[h] --grep=S[e]c >actual &&
+	git -c grep.patternType=extended log --pretty="tformat:%s" --invert-grep --grep=t[h] --grep=S[e]c >actual &&
 	test_cmp expect actual &&

 	# PCRE
--
2.34.0
Junio C Hamano· Dec 18, 2021, 00:14 UTC · re: René Scharfe · lore

Re: [PATCH] t4202: fix patternType setting in --invert-grep test

René Scharfe <l.s.r@web.de> writes:
Show 18 quoted lines
> Actually use extended regexes as indicated in the comment.
>
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
>  t/t4202-log.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t4202-log.sh b/t/t4202-log.sh
> index 7884e3d46b..f51b57b4a2 100755
> --- a/t/t4202-log.sh
> +++ b/t/t4202-log.sh
> @@ -250,7 +250,7 @@ test_expect_success 'log --invert-grep --grep' '
>  	test_cmp expect actual &&
>
>  	# POSIX extended
> -	git -c grep.patternType=basic log --pretty="tformat:%s" --invert-grep --grep=t[h] --grep=S[e]c >actual &&
> +	git -c grep.patternType=extended log --pretty="tformat:%s" --invert-grep --grep=t[h] --grep=S[e]c >actual &&
>  	test_cmp expect actual &&
Good eyes.
Thanks.

← back to recent threads