aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/t0061-run-command.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
index 12228b4aa..98c09dd98 100755
--- a/t/t0061-run-command.sh
+++ b/t/t0061-run-command.sh
@@ -26,6 +26,17 @@ test_expect_success 'run_command can run a command' '
test_cmp empty err
'
+test_expect_success !MINGW 'run_command can run a script without a #! line' '
+ cat >hello <<-\EOF &&
+ cat hello-script
+ EOF
+ chmod +x hello &&
+ test-run-command run-command ./hello >actual 2>err &&
+
+ test_cmp hello-script actual &&
+ test_cmp empty err
+'
+
test_expect_success POSIXPERM 'run_command reports EACCES' '
cat hello-script >hello.sh &&
chmod -x hello.sh &&