Skip to content

Commit

Permalink
t3501: use test_path_is_* functions
Browse files Browse the repository at this point in the history
Two test -f are present in t3501. They can be replaced with appropriate
helper function: test_path_is_file

Signed-off-by: Labnann <khalid.masum.92@gmail.com>
  • Loading branch information
Labnann committed Mar 30, 2022
1 parent 805e0a6 commit 8b7d38a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/t3501-revert-cherry-pick.sh
Expand Up @@ -67,7 +67,7 @@ test_expect_success 'cherry-pick after renaming branch' '
git checkout rename2 &&
git cherry-pick added &&
test $(git rev-parse HEAD^) = $(git rev-parse rename2) &&
test -f opos &&
test_path_is_file opos &&
grep "Add extra line at the end" opos &&
git reflog -1 | grep cherry-pick
Expand All @@ -78,7 +78,7 @@ test_expect_success 'revert after renaming branch' '
git checkout rename1 &&
git revert added &&
test $(git rev-parse HEAD^) = $(git rev-parse rename1) &&
test -f spoo &&
test_path_is_file spoo &&
! grep "Add extra line at the end" spoo &&
git reflog -1 | grep revert
Expand Down

0 comments on commit 8b7d38a

Please sign in to comment.