(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'signals work as we expect'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (command.Simple
      words: [{<cat>}]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})
        (redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_span_id: 26
              stdin_parts: [<'three\n'> <'two\n'> <'one\n'>]
            )
        )
      ]
      do_fork: T
    )
    (C {<test_expect_success>} {(SQ <'sigchain works'>)} 
      {
        (SQ <'\n'> <'\t{ test-sigchain >actual; ret=$?; } &&\n'> <'\t{\n'> 
          <'\t\t# Signal death by raise() on Windows acts like exit(3),\n'> <'\t\t# regardless of the signal number. So we must allow that\n'> 
          <'\t\t# as well as the normal signal check.\n'> <'\t\ttest_match_signal 15 "$ret" ||\n'> <'\t\ttest "$ret" = 3\n'> <'\t} &&\n'> 
          <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} 
      {(SQ <'signals are propagated using shell convention'>)} 
      {
        (SQ <'\n'> <'\t# we use exec here to avoid any sub-shell interpretation\n'> 
          <'\t# of the exit code\n'> <'\tgit config alias.sigterm "!exec test-sigchain" &&\n'> <'\ttest_expect_code 143 git sigterm\n'>
        )
      }
    )
    (command.ShFunction
      name: large_git
      body: 
        (BraceGroup
          children: [
            (command.ForEach
              iter_name: i
              iter_words: [
                {
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: (C {<test_seq>} {<1>} {<100>})
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {<git>} {<diff>} {<--cached>} {<--binary>})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (C {<test_expect_success>} {(SQ <'create blob'>)} 
      {(SQ <'\n'> <'\ttest-genrandom foo 16384 >file &&\n'> <'\tgit add file\n'>)}
    )
    (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'a constipated git dies with SIGPIPE'>)} 
      {
        (SQ <'\n'> <'\tOUT=$( ((large_git; echo $? 1>&3) | :) 3>&1 ) &&\n'> 
          <'\ttest_match_signal 13 "$OUT"\n'>
        )
      }
    )
    (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} 
      {(SQ <'a constipated git dies with SIGPIPE even if parent ignores it'>)} 
      {
        (SQ <'\n'> <'\tOUT=$( ((trap "" PIPE; large_git; echo $? 1>&3) | :) 3>&1 ) &&\n'> 
          <'\ttest_match_signal 13 "$OUT"\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)