summaryrefslogtreecommitdiff
path: root/t/t4117-apply-reject.sh
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2020-02-23 08:48:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-24 19:15:40 (GMT)
commit91de82adc9f467c58b10fbcf79a62aa599796456 (patch)
treee8a5ca75c0b1c19a8556e2a471cbd8090d7435b9 /t/t4117-apply-reject.sh
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783 (diff)
downloadgit-91de82adc9f467c58b10fbcf79a62aa599796456.zip
git-91de82adc9f467c58b10fbcf79a62aa599796456.tar.gz
git-91de82adc9f467c58b10fbcf79a62aa599796456.tar.bz2
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>
Diffstat (limited to 't/t4117-apply-reject.sh')
-rwxr-xr-xt/t4117-apply-reject.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t4117-apply-reject.sh b/t/t4117-apply-reject.sh
index f7de6f0..0ee93fe 100755
--- a/t/t4117-apply-reject.sh
+++ b/t/t4117-apply-reject.sh
@@ -74,7 +74,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
test_must_fail git apply --reject patch.1 &&
test_cmp expected file1 &&
- cat file1.rej &&
+ test_path_is_file file1.rej &&
test_path_is_missing file2.rej
'
@@ -87,7 +87,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
test_path_is_missing file1 &&
test_cmp expected file2 &&
- cat file2.rej &&
+ test_path_is_file file2.rej &&
test_path_is_missing file1.rej
'
@@ -101,7 +101,7 @@ test_expect_success 'the same test with --verbose' '
test_path_is_missing file1 &&
test_cmp expected file2 &&
- cat file2.rej &&
+ test_path_is_file file2.rej &&
test_path_is_missing file1.rej
'