From: Lars Schneider <redacted>
The stats command works differently on OS X compared to Linux. Detect
OS X and execute the appropriate assertions.
Signed-off-by: Lars Schneider <redacted>
---
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