[PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X
- From
larsxschneider@gmail.com <larsxschneider@gmail.com>
- Date
- Oct 4, 2015, 18:06 UTC
- Message-ID
- <1443981977-64604-4-git-send-email-larsxschneider@gmail.com>
- In-Reply-To
- <1443981977-64604-1-git-send-email-larsxschneider@gmail.com>
From: Lars Schneider <larsxschneider@gmail.com>
The stats command works differently on OS X compared to Linux. Detect OS X and execute the appropriate assertions.
Signed-off-by: Lars Schneider <larsxschneider@gmail.com> --- t/t9815-git-p4-submit-fail.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh index 4cff6a7..520b812 100755 --- a/t/t9815-git-p4-submit-fail.sh +++ b/t/t9815-git-p4-submit-fail.sh @@ -417,8 +417,12 @@ 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 + if test_have_prereq CYGWIN; then + : # NOOP + elif test_have_prereq DARWIN; then + stat -f %Sp text | egrep ^-r-- && + stat -f %Sp text+x | egrep ^-r-x + else stat --format=%A text | egrep ^-r-- && stat --format=%A text+x | egrep ^-r-x fi
-- 2.5.1