t7408: replace incorrect uses of test_must_fail
commit4cf795b842f37b56fae09c3412f3c59c370c392d
authorDenton Liu <liu.denton@gmail.com>
Mon, 20 Apr 2020 08:54:40 +0000 (20 04:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Apr 2020 20:12:13 +0000 (20 13:12 -0700)
treef576204843b31fc9778536c68e1666b3c9432046
parent085ba9b5dc8c39113f26c2c7ce4a17f3953948af
t7408: replace incorrect uses of test_must_fail

According to t/README, test_must_fail() should only be used to test for
failure in Git commands.

Replace the invocation of `test_must_fail test_path_is_file` with
`test_path_is_missing` since, in this test case, the path should not
exist at all.

In all the cases where `test_must_fail test_alternate_is_used` appears,
test_alternate_is_used() fails because test_line_count() cannot open the
non-existent $alternates_file. Replace
`test_must_fail test_alternate_is_used` with `test_path_is_missing` to
test for this directly.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7408-submodule-reference.sh