All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shourya Shukla <shouryashukla.oo@gmail.com>
To: sunshine@sunshineco.com
Cc: git@vger.kernel.org, gitster@pobox.com,
	johannes.schindelin@gmx.de, shouryashukla.oo@gmail.com
Subject: [PATCH 3/3] t6025: use helpers to replace test -f <path>
Date: Sat, 18 Jan 2020 14:03:23 +0530	[thread overview]
Message-ID: <20200118083326.9643-4-shouryashukla.oo@gmail.com> (raw)
In-Reply-To: <20200118083326.9643-1-shouryashukla.oo@gmail.com>

Take advantage of helper function 'test_path_is_file()' to
replace 'test -f' since the function makes the code more
readable and gives better error messages.

Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>
---
 t/t6025-merge-symlinks.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t6025-merge-symlinks.sh b/t/t6025-merge-symlinks.sh
index 41bae56ea9..ebbbc03f1d 100755
--- a/t/t6025-merge-symlinks.sh
+++ b/t/t6025-merge-symlinks.sh
@@ -38,7 +38,7 @@ test_expect_success 'merge master into b-symlink, which has a different symbolic
 '
 
 test_expect_success 'the merge result must be a file' '
-	test -f symlink
+	test_path_is_file symlink
 '
 
 test_expect_success 'merge master into b-file, which has a file instead of a symbolic link' '
@@ -48,7 +48,7 @@ test_expect_success 'merge master into b-file, which has a file instead of a sym
 '
 
 test_expect_success 'the merge result must be a file' '
-	test -f symlink
+	test_path_is_file symlink
 '
 
 test_expect_success 'merge b-file, which has a file instead of a symbolic link, into master' '
@@ -58,7 +58,7 @@ test_expect_success 'merge b-file, which has a file instead of a symbolic link,
 '
 
 test_expect_success 'the merge result must be a file' '
-	test -f symlink
+	test_path_is_file symlink
 '
 
 test_done
-- 
2.20.1


  parent reply	other threads:[~2020-01-18  8:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 20:36 [PATCH 0/3] t6025: updating tests Shourya Shukla
2020-01-16 20:36 ` [PATCH 1/3] t6025: modernize style Shourya Shukla
2020-01-16 21:42   ` Johannes Schindelin
2020-01-16 20:36 ` [PATCH 2/3] t6025: replace pipe with redirection operator Shourya Shukla
2020-01-16 22:57   ` Junio C Hamano
2020-01-16 20:36 ` [PATCH 3/3] t6025: use helpers to replace test -f <path> Shourya Shukla
2020-01-16 22:58   ` Junio C Hamano
2020-01-17 20:44     ` [PATCH 0/3] t6025: amended changes after suggestions from the community Shourya Shukla
2020-01-17 20:44       ` [PATCH 1/3] t6025: modernize style Shourya Shukla
2020-01-17 21:15         ` Eric Sunshine
2020-01-17 21:28           ` Junio C Hamano
2020-01-17 20:44       ` [PATCH 2/3] t6025: replace pipe with redirection operator Shourya Shukla
2020-01-17 21:24         ` Eric Sunshine
2020-01-18  8:33           ` [PATCH 0/3] t6025: updating tests Shourya Shukla
2020-01-18  8:33             ` [PATCH 1/3] t6025: modernize style Shourya Shukla
2020-01-18  8:33             ` [PATCH 2/3] t6025: replace pipe with redirection operator Shourya Shukla
2020-01-18  8:33             ` Shourya Shukla [this message]
2020-01-18  8:33             ` [PATCH v3 0/2] t025: amended changes after suggestions from the community Shourya Shukla
2020-01-18  8:33             ` [PATCH v3 1/2] t6025: modernize style Shourya Shukla
2020-01-21 21:57               ` Junio C Hamano
2020-01-18  8:33             ` [PATCH v3 2/2] t6025: use helpers to replace test -f <path> Shourya Shukla
2020-01-21 21:58               ` Junio C Hamano
2020-01-17 20:44       ` [PATCH 3/3] " Shourya Shukla
2020-01-16 21:46 ` [PATCH 0/3] t6025: updating tests Johannes Schindelin

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

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

  git send-email \
    --in-reply-to=20200118083326.9643-4-shouryashukla.oo@gmail.com \
    --to=shouryashukla.oo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=sunshine@sunshineco.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.