(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <"Test run command">)}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (C {(.)} {(./test-lib.sh)})
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(hello-script)} spids:[26])
        (HereDoc
          op_id: Redir_DLessDash
          fd: -1
          body: {(DQ ("#!") ($ VSub_Name "$SHELL_PATH") ("\n") ("cat hello-script\n"))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [29]
        )
      ]
    )
    (SimpleCommand redirects:[(Redir op_id:Redir_Great fd:-1 arg_word:{(empty)} spids:[36])])
    (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">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[114])
        (HereDoc
          op_id: Redir_DLessDash
          fd: -1
          body: 
            {
              (DQ ("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_expansion: True
          here_end: EOF
          was_filled: True
          spids: [117]
        )
      ]
    )
    (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">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[174])
        (HereDoc
          op_id: Redir_DLessDash
          fd: -1
          body: 
            {
              (DQ ("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_expansion: True
          here_end: EOF
          was_filled: True
          spids: [177]
        )
      ]
    )
    (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">
        )
      }
    )
    (SimpleCommand
      words: [{(cat)}]
      redirects: [
        (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[202])
        (HereDoc
          op_id: Redir_DLessDash
          fd: -1
          body: {(DQ ("no further jobs available\n"))}
          do_expansion: True
          here_end: EOF
          was_filled: True
          spids: [205]
        )
      ]
    )
    (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)})
  ]
)