Skip to content

Commit

Permalink
t5300: fix test_with_bad_commit()
Browse files Browse the repository at this point in the history
0f8edf7 (index-pack: --fsck-objects to take an optional argument for
fsck msgs, 2024-02-01) added a test function test_with_bad_commit() that
contained two bugs. test_expect_fail was used instead of test_must_fail,
and a && was not included at the end of the line.

Fix these two issues in the test.

Signed-off-by: John Cai <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
john-cai authored and gitster committed Mar 15, 2024
1 parent 0f8edf7 commit ad538c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t5300-pack-object.sh
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ test_with_bad_commit () {
must_pass_arg="$2" &&
(
cd strict &&
test_expect_fail git index-pack "$must_fail_arg" "test-$(cat pack-name).pack"
test_must_fail git index-pack "$must_fail_arg" "test-$(cat pack-name).pack" &&
git index-pack "$must_pass_arg" "test-$(cat pack-name).pack"
)
}
Expand Down

0 comments on commit ad538c6

Please sign in to comment.