git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Harshit Jain <harshitjain1371999@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, harshitjain1371999@gmail.com,
	shouryashukla.oo@gmail.com
Subject: [PATCH 2/2] t4131: use helper function to replace 'test -f'
Date: Fri, 20 Mar 2020 18:38:45 +0530	[thread overview]
Message-ID: <20200320130845.23257-3-harshitjain1371999@gmail.com> (raw)
In-Reply-To: <20200320130845.23257-1-harshitjain1371999@gmail.com>

Replace 'test -f' with the helper function 'test_path_is_file' as the
helper function improves the code readability and also gives better
error messages.

Signed-off-by: Harshit Jain <harshitjain1371999@gmail.com>
---
 t/t4131-apply-fake-ancestor.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4131-apply-fake-ancestor.sh b/t/t4131-apply-fake-ancestor.sh
index 828d1a355b..21ee359632 100755
--- a/t/t4131-apply-fake-ancestor.sh
+++ b/t/t4131-apply-fake-ancestor.sh
@@ -33,7 +33,7 @@ test_expect_success 'apply --build-fake-ancestor in a subdirectory' '
 	(
 		cd sub &&
 		git apply --build-fake-ancestor 3.ancestor ../3.patch &&
-		test -f 3.ancestor
+		test_path_is_file 3.ancestor
 	) &&
 	git apply --build-fake-ancestor 3.ancestor 3.patch &&
 	test_cmp sub/3.ancestor 3.ancestor
-- 
2.26.0.rc2


  parent reply	other threads:[~2020-03-20 13:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 13:29 [GSoC][Patch 0/2] t4131: update test script Harshit Jain
2020-03-19 13:29 ` [GSoC][PATCH 1/2] t4131: modernize style Harshit Jain
2020-03-19 16:38   ` Shourya Shukla
2020-03-19 17:45     ` Harshit Jain
2020-03-19 21:55       ` Junio C Hamano
2020-03-19 13:29 ` [GSoC][PATCH 2/2] t4131: use helper function to replace test -f <path> Harshit Jain
2020-03-19 16:42   ` Shourya Shukla
2020-03-19 17:33     ` Kaartic Sivaraam
2020-03-19 20:18       ` Harshit Jain
2020-03-20 15:39       ` Re: RFC][Feature] submodule Shourya Shukla
2020-03-19 21:58     ` [GSoC][PATCH 2/2] t4131: use helper function to replace test -f <path> Junio C Hamano
2020-03-20 13:08       ` [GSoC][Patch 0/2] made the changes as per community suggestions Harshit Jain
2020-03-20 13:08         ` [PATCH 1/2] t4131: modernize style Harshit Jain
2020-03-20 15:56           ` Re: [GSoC][Patch] Shourya Shukla
2020-03-20 17:14             ` Harshit Jain
2020-03-20 13:08         ` Harshit Jain [this message]
2020-03-20 15:43       ` Shourya Shukla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200320130845.23257-3-harshitjain1371999@gmail.com \
    --to=harshitjain1371999@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=shouryashukla.oo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).