[PATCH v5 02/11] t0061: run_command executes scripts without a #! line
- From
- Brandon Williams <bmwill@google.com>
- Date
- Apr 18, 2017, 23:17 UTC
- Message-ID
- <20170418231805.61835-3-bmwill@google.com>
- In-Reply-To
- <20170418231805.61835-1-bmwill@google.com>
Add a test to 't0061-run-command.sh' to ensure that run_command can continue to execute scripts which don't include a '#!' line.
Signed-off-by: Brandon Williams <bmwill@google.com> --- t/t0061-run-command.sh | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh index 12228b4aa..1a7490e29 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 '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 &&
-- 2.12.2.816.g2cccc81164-goog