summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-03-27 12:19:30 -0700
committerJunio C Hamano <gitster@pobox.com>2012-03-27 12:19:30 -0700
commit8e55f2e54a095070c7e32ca93c3e4faa1a43f16c (patch)
tree4d03664e6f9c1dda5d2fd0c235303dd4ef0c0d30
parente2363a785f6cc6aec624292a6aa01d26e93cffb2 (diff)
downloadgit-jk/run-command-eacces.tar.gz
[DONTMERGE] semi-squashable test additionjk/run-command-eacces
-rwxr-xr-xt/t0061-run-command.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
index 8d4938f019..dbb1d9e56f 100755
--- a/t/t0061-run-command.sh
+++ b/t/t0061-run-command.sh
@@ -26,7 +26,7 @@ test_expect_success 'run_command can run a command' '
test_cmp empty err
'
-test_expect_success POSIXPERM 'run_command reports EACCES' '
+test_expect_failure POSIXPERM 'run_command reports EACCES' '
cat hello-script >hello.sh &&
chmod -x hello.sh &&
test_must_fail test-run-command run-command ./hello.sh 2>err &&
@@ -34,4 +34,17 @@ test_expect_success POSIXPERM 'run_command reports EACCES' '
grep "fatal: cannot exec.*hello.sh" err
'
+test_expect_success POSIXPERM 'unreadable directory in PATH' '
+ mkdir local-command &&
+ test_when_finished "chmod u+rwx local-command && rm -fr local-command" &&
+ git config alias.nitfol "!echo frotz" &&
+ chmod a-rx local-command &&
+ (
+ PATH=./local-command:$PATH &&
+ git nitfol >actual
+ ) &&
+ echo frotz >expect &&
+ test_cmp expect actual
+'
+
test_done