3 # Copyright (c) 2009 Ilari Liusvaara
6 test_description
='Test run command'
10 cat >hello-script
<<-EOF
16 test_expect_success
'start_command reports ENOENT' '
17 test-run-command start-command-ENOENT ./does-not-exist
20 test_expect_success
'run_command can run a command' '
21 cat hello-script >hello.sh &&
23 test-run-command run-command ./hello.sh >actual 2>err &&
25 test_cmp hello-script actual &&
29 test_expect_success POSIXPERM
'run_command reports EACCES' '
30 cat hello-script >hello.sh &&
32 test_must_fail test-run-command run-command ./hello.sh 2>err &&
34 grep "fatal: cannot exec.*hello.sh" err