(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[21])
          op: Equal
          rhs: {(SQ <'Test run command'>)}
          spids: [21]
        )
      ]
      spids: [21]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(hello-script)})
        (redir.HereDoc
          op: <Redir_DLessDash '<<-'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 45
          stdin_parts: [('#!') ($ VSub_Name '$SHELL_PATH') ('\n') ('cat hello-script\n')]
        )
      ]
    )
    (command.SimpleCommand
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(empty)})]
    )
    (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) (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.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLessDash '<<-'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 143
          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')
          ]
        )
      ]
    )
    (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.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLessDash '<<-'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 199
          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')
          ]
        )
      ]
    )
    (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.SimpleCommand
      words: [{(cat)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})
        (redir.HereDoc
          op: <Redir_DLessDash '<<-'>
          fd: 16777215
          here_begin: {(EOF)}
          here_end_span_id: 224
          stdin_parts: [('no further jobs available\n')]
        )
      ]
    )
    (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)})
  ]
)