summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-25 02:41:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-25 02:41:09 (GMT)
commitf67b980771b8cda5fc2093aef6dbec5d7210dcab (patch)
tree0b4b2f6e322e68ac53dce071d294fa804f573f6f /t
parent268fbcd172cdb306e8a3e7143cc16677c963d6cd (diff)
parent321fd82389742398d2924640ce3a61791fd27d60 (diff)
downloadgit-f67b980771b8cda5fc2093aef6dbec5d7210dcab.zip
git-f67b980771b8cda5fc2093aef6dbec5d7210dcab.tar.gz
git-f67b980771b8cda5fc2093aef6dbec5d7210dcab.tar.bz2
t0061: adjust to test-tool transition
Diffstat (limited to 't')
-rwxr-xr-xt/t0061-run-command.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
index c887ed5..b9cfc03 100755
--- a/t/t0061-run-command.sh
+++ b/t/t0061-run-command.sh
@@ -13,10 +13,14 @@ cat >hello-script <<-EOF
EOF
>empty
-test_expect_success 'start_command reports ENOENT' '
+test_expect_success 'start_command reports ENOENT (slash)' '
test-tool run-command start-command-ENOENT ./does-not-exist
'
+test_expect_success 'start_command reports ENOENT (no slash)' '
+ test-tool run-command start-command-ENOENT does-not-exist
+'
+
test_expect_success 'run_command can run a command' '
cat hello-script >hello.sh &&
chmod +x hello.sh &&
@@ -26,6 +30,13 @@ test_expect_success 'run_command can run a command' '
test_cmp empty err
'
+test_expect_success 'run_command is restricted to PATH' '
+ write_script should-not-run <<-\EOF &&
+ echo yikes
+ EOF
+ test_must_fail test-tool run-command run-command should-not-run
+'
+
test_expect_success !MINGW 'run_command can run a script without a #! line' '
cat >hello <<-\EOF &&
cat hello-script