t1507: assert output of rev-parse

Tests in t1507-rev-parse-upstream.sh compare files "expect" and "actual" to assert the output of "git rev-parse", "git show", and "git log". However, two of the tests '@{reflog}-parsing does not look beyond colon' and '@{upstream}-parsing does not look beyond colon' don't inspect the contents of the created files. Assert output of "git rev-parse" in tests in t1507-rev-parse-upstream.sh to improve test coverage. Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Andrei Rybak committed Mar 18, 2023 at 16:46 UTC a93cbe8d78a42bb016f62b755421bdd4fd7d5d14
1 file changed +4 -2
t/t1507-rev-parse-upstream.sh
+4 -2
@@ -258,7 +258,8 @@ test_expect_success '@{reflog}-parsing does not look beyond colon' '
258 git add @{yesterday} &&
259 git commit -m "funny reflog file" &&
260 git hash-object @{yesterday} >expect &&
261 - git rev-parse HEAD:@{yesterday} >actual
261 + git rev-parse HEAD:@{yesterday} >actual &&
262 + test_cmp expect actual
263 '
264
265 test_expect_success '@{upstream}-parsing does not look beyond colon' '
@@ -266,7 +267,8 @@ test_expect_success '@{upstream}-parsing does not look beyond colon' '
267 git add @{upstream} &&
268 git commit -m "funny upstream file" &&
269 git hash-object @{upstream} >expect &&
269 - git rev-parse HEAD:@{upstream} >actual
270 + git rev-parse HEAD:@{upstream} >actual &&
271 + test_cmp expect actual
272 '
273
274 test_done