X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4120-apply-popt.sh;h=a33d510bf6b27a6bb2c640cfc9d11f462cbdf7a6;hb=20fc73e3b0bb2b115d88e54514db13ffaf11b025;hp=579c9e61054521301464bfc31351040d45966836;hpb=267684f0b7428583ba88c4acc0e9ef322a36b3ff;p=git.git diff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh index 579c9e610..a33d510bf 100755 --- a/t/t4120-apply-popt.sh +++ b/t/t4120-apply-popt.sh @@ -6,6 +6,7 @@ test_description='git apply -p handling.' . ./test-lib.sh +. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh test_expect_success setup ' mkdir sub && @@ -62,8 +63,12 @@ test_expect_success 'apply (-p2) diff, mode change only' ' old mode 100644 new mode 100755 EOF - chmod 644 file1 && - git apply -p2 patch.chmod && + test_chmod -x file1 && + git apply --index -p2 patch.chmod && + case $(git ls-files -s file1) in 100755*) : good;; *) false;; esac +' + +test_expect_success FILEMODE 'file mode was changed' ' test -x file1 '