t4117: check for files using `test_path_is_file`
commit91de82adc9f467c58b10fbcf79a62aa599796456
authorMartin Ågren <martin.agren@gmail.com>
Sun, 23 Feb 2020 08:48:34 +0000 (23 09:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2020 19:15:40 +0000 (24 11:15 -0800)
treee8a5ca75c0b1c19a8556e2a471cbd8090d7435b9
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783
t4117: check for files using `test_path_is_file`

We `cat` files, but don't inspect or grab the contents in any way. These
`cat` calls look like remnants from a debug session, so it's tempting to
get rid of them. But they do actually verify that the files exist, which
might not necessarily be the case for some failure modes of `git apply
--reject`. Let's not lose that.

Convert the `cat` calls to use `test_path_is_file` instead. This is of
course still a minor change since we no longer verify that the files can
be opened for reading, but that is not something we usually worry about.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4117-apply-reject.sh