git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: larsxschneider@gmail.com
To: git@vger.kernel.org
Cc: luke@diamand.org, Lars Schneider <larsxschneider@gmail.com>
Subject: [PATCH v1 1/2] git-p4: Improve test case portability for t9815 git-p4-submit-fail
Date: Mon, 12 Oct 2015 10:03:03 -0700	[thread overview]
Message-ID: <1444669384-85419-2-git-send-email-larsxschneider@gmail.com> (raw)
In-Reply-To: <1444669384-85419-1-git-send-email-larsxschneider@gmail.com>

From: Lars Schneider <larsxschneider@gmail.com>

Replace the stats command with the ls command to check file mode bits.
The stats command is not available on Windows and has different
command line options on OS X.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---
 t/t9815-git-p4-submit-fail.sh | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh
index 4cff6a7..37b42d0 100755
--- a/t/t9815-git-p4-submit-fail.sh
+++ b/t/t9815-git-p4-submit-fail.sh
@@ -417,11 +417,8 @@ test_expect_success 'cleanup chmod after submit cancel' '
 		! p4 fstat -T action text &&
 		test_path_is_file text+x &&
 		! p4 fstat -T action text+x &&
-		if test_have_prereq !CYGWIN
-		then
-			stat --format=%A text | egrep ^-r-- &&
-			stat --format=%A text+x | egrep ^-r-x
-		fi
+		ls -l text | egrep ^-r-- &&
+		ls -l text+x | egrep ^-r-x
 	)
 '
 
-- 
2.5.1

  reply	other threads:[~2015-10-12 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 17:03 [PATCH v1 0/2] git-p4: Fix tests on OS X larsxschneider
2015-10-12 17:03 ` larsxschneider [this message]
2015-10-12 17:03 ` [PATCH v1 2/2] git-p4: Skip t9819 test case on case insensitive file systems larsxschneider
2015-10-22 22:47 ` [PATCH v1 0/2] git-p4: Fix tests on OS X Luke Diamand

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=1444669384-85419-2-git-send-email-larsxschneider@gmail.com \
    --to=larsxschneider@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=luke@diamand.org \
    /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 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 NNTP newsgroup(s).