(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'Test run command'>)} spids: [13] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<hello-script>}) (redir op: <Id.Redir_DLessDash '<<-'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 37 stdin_parts: [<'#!'> ($ Id.VSub_DollarName '$SHELL_PATH') <'\n'> <'cat hello-script\n'>] ) ) ] do_fork: T ) (command.Simple redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<empty>})] do_fork: F ) (C {<test_expect_success>} {(SQ <'start_command reports ENOENT'>)} {(SQ <'\n'> <'\ttest-run-command start-command-ENOENT ./does-not-exist\n'>)} ) (C {<test_expect_success>} {(SQ <'run_command can run a command'>)} { (SQ <'\n'> <'\tcat hello-script >hello.sh &&\n'> <'\tchmod +x hello.sh &&\n'> <'\ttest-run-command run-command ./hello.sh >actual 2>err &&\n'> <'\n'> <'\ttest_cmp hello-script actual &&\n'> <'\ttest_cmp empty err\n'> ) } ) (C {<test_expect_success>} {<POSIXPERM>} {(SQ <'run_command reports EACCES'>)} { (SQ <'\n'> <'\tcat hello-script >hello.sh &&\n'> <'\tchmod -x hello.sh &&\n'> <'\ttest_must_fail test-run-command run-command ./hello.sh 2>err &&\n'> <'\n'> <'\tgrep "fatal: cannot exec.*hello.sh" err\n'> ) } ) (C {<test_expect_success>} {<POSIXPERM> <Id.Lit_Comma ','> <SANITY>} {(SQ <'unreadable directory in PATH'>)} { (SQ <'\n'> <'\tmkdir local-command &&\n'> <'\ttest_when_finished "chmod u+rwx local-command && rm -fr local-command" &&\n'> <'\tgit config alias.nitfol "!echo frotz" &&\n'> <'\tchmod a-rx local-command &&\n'> <'\t(\n'> <'\t\tPATH=./local-command:$PATH &&\n'> <'\t\tgit nitfol >actual\n'> <'\t) &&\n'> <'\techo frotz >expect &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLessDash '<<-'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 135 stdin_parts: [ <'preloaded output of a child\n'> <'Hello\n'> <'World\n'> <'preloaded output of a child\n'> <'Hello\n'> <'World\n'> <'preloaded output of a child\n'> <'Hello\n'> <'World\n'> <'preloaded output of a child\n'> <'Hello\n'> <'World\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'run_command runs in parallel with more jobs available than tasks'>)} { (SQ <'\n'> < '\ttest-run-command run-command-parallel 5 sh -c "printf \\"%s\\n%s\\n\\" Hello World" 2>actual &&\n' > <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'run_command runs in parallel with as many jobs as tasks'>)} { (SQ <'\n'> < '\ttest-run-command run-command-parallel 4 sh -c "printf \\"%s\\n%s\\n\\" Hello World" 2>actual &&\n' > <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'run_command runs in parallel with more tasks than jobs available'>)} { (SQ <'\n'> < '\ttest-run-command run-command-parallel 3 sh -c "printf \\"%s\\n%s\\n\\" Hello World" 2>actual &&\n' > <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLessDash '<<-'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 191 stdin_parts: [ <'preloaded output of a child\n'> <'asking for a quick stop\n'> <'preloaded output of a child\n'> <'asking for a quick stop\n'> <'preloaded output of a child\n'> <'asking for a quick stop\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'run_command is asked to abort gracefully'>)} { (SQ <'\n'> <'\ttest-run-command run-command-abort 3 false 2>actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLessDash '<<-'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 216 stdin_parts: [<'no further jobs available\n'>] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'run_command outputs '>)} { (SQ <'\n'> < '\ttest-run-command run-command-no-jobs 3 sh -c "printf \\"%s\\n%s\\n\\" Hello World" 2>actual &&\n' > <'\ttest_cmp expect actual\n'> ) } ) (C {<test_done>}) ] )