diff options
author | Andrei Rybak <rybak.a.v@gmail.com> | 2023-03-18 18:46:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-20 19:11:42 +0300 |
commit | 94f07b55443147fce3c7fb46e97d696da3ce8d55 (patch) | |
tree | ac00984f4fbc383b542305b4f8ebc5aebceb89ed /t/t1400-update-ref.sh | |
parent | 17ae7f758e728ac40e326a3ab82a7727d735484a (diff) |
t1400: assert output of update-ref
In t1400-update-ref.sh test 'transaction can create and delete' creates
files "expect" and "actual", but doesn't compare them. Similarly, test
'transaction cannot restart ongoing transaction' redirects output of
"git update-ref" to file "actual", but doesn't check its contents with
any assertions.
Assert output of "git update-ref" in tests to improve test coverage in
t1400-update-ref.sh.
Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1400-update-ref.sh')
-rwxr-xr-x | t/t1400-update-ref.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index cf58cf025c..4d66cd7f4a 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update-ref.sh @@ -1568,6 +1568,7 @@ test_expect_success 'transaction can create and delete' ' EOF git update-ref --stdin <stdin >actual && printf "%s: ok\n" start commit start commit >expect && + test_cmp expect actual && test_must_fail git show-ref --verify refs/heads/create-and-delete ' @@ -1595,6 +1596,8 @@ test_expect_success 'transaction cannot restart ongoing transaction' ' commit EOF test_must_fail git update-ref --stdin <stdin >actual && + printf "%s: ok\n" start >expect && + test_cmp expect actual && test_must_fail git show-ref --verify refs/heads/restart ' |