threads / patch / 59716

patchtest: rev-parse-upstream: add missing cmp

Subject: [PATCH] test: rev-parse-upstream: add missing cmp

## tl;dr

2 messages between May 9, 2023 and May 10, 2023. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Felipe Contreras· May 9, 2023, 00:02 UTC · lore

It seems pretty clear 5236fce6b4 (t1507: stop losing return codes of git commands, 2019-12-20) missed a test_cmp.

Cc: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 t/t1507-rev-parse-upstream.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Show changes to t/t1507-rev-parse-upstream.sh +2 −1
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index d94c72c672..cb9ef7e329 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -97,7 +97,8 @@ test_expect_success 'my-side@{u} resolves to correct commit' '
 	commit_subject my-side >actual &&
 	test_cmp expect actual &&
 	echo 5 >expect &&
-	commit_subject my-side@{u} >actual
+	commit_subject my-side@{u} >actual &&
+	test_cmp expect actual
 '
 
 test_expect_success 'not-tracking@{u} fails' '
-- 
2.40.0+fc1
Junio C Hamano· May 10, 2023, 03:56 UTC · re: Felipe Contreras · lore

Re: [PATCH] test: rev-parse-upstream: add missing cmp

Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 23 quoted lines
> It seems pretty clear 5236fce6b4 (t1507: stop losing return codes of git
> commands, 2019-12-20) missed a test_cmp.
>
> Cc: Denton Liu <liu.denton@gmail.com>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  t/t1507-rev-parse-upstream.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
> index d94c72c672..cb9ef7e329 100755
> --- a/t/t1507-rev-parse-upstream.sh
> +++ b/t/t1507-rev-parse-upstream.sh
> @@ -97,7 +97,8 @@ test_expect_success 'my-side@{u} resolves to correct commit' '
>  	commit_subject my-side >actual &&
>  	test_cmp expect actual &&
>  	echo 5 >expect &&
> -	commit_subject my-side@{u} >actual
> +	commit_subject my-side@{u} >actual &&
> +	test_cmp expect actual
>  '
>  
>  test_expect_success 'not-tracking@{u} fails' '
Good eyes.

a93cbe8d (t1507: assert output of rev-parse, 2023-03-18) and wanted to do the same to this script, and the series that contains the commit wanted to do the same to many other test scripts, but it seems to have missed this one.

Will queue (on top of a93cbe8d, naturally).
Thanks.

← back to recent threads