(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[12])
          op: Equal
          rhs: {(SQ <'test subject preservation with format-patch | am'>)}
          spids: [12]
        )
      ]
      spids: [12]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: make_patches
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:type spids:[29])
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [29]
                )
              ]
              spids: [29]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:subject spids:[33])
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [33]
                )
              ]
              spids: [33]
            )
            (C {(test_expect_success)} 
              {(DQ ('create patches with ') ($ VSub_Name '$type') (' subject'))} 
              {
                (SQ <'\n'> <'\t\tgit reset --hard baseline &&\n'> <'\t\techo $type >file &&\n'> 
                  <'\t\tgit commit -a -m "$subject" &&\n'> <'\t\tgit format-patch -1 --stdout >$type.patch &&\n'> 
                  <'\t\tgit format-patch -1 --stdout -k >$type-k.patch\n'> <'\t'>
                )
              }
            )
          ]
          spids: [26]
        )
      spids: [22 25]
    )
    (command.FuncDef
      name: check_subject
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(git)} {(reset)} {(--hard)} {(baseline)})
                (C {(git)} {(am)} {($ VSub_Number '$2')} {($ VSub_Number '$1') (.patch)})
                (command.SimpleCommand
                  words: [
                    {(git)}
                    {(log)}
                    {(-1)}
                    {(--pretty) (Lit_Other '=') (format) (Lit_Other ':') (Lit_Other '%') (B)}
                  ]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(actual)})]
                )
                (C {(test_cmp)} {(expect)} {(actual)})
              ]
            )
          ]
          spids: [62]
        )
      spids: [58 61]
    )
    (C {(test_expect_success)} {(SQ <'setup baseline commit'>)} 
      {(SQ <'\n'> <'\ttest_commit baseline file\n'>)}
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:SHORT_SUBJECT spids:[128])
          op: Equal
          rhs: {(SQ <'short subject'>)}
          spids: [128]
        )
      ]
      spids: [128]
    )
    (C {(make_patches)} {(short)} {(DQ ($ VSub_Name '$SHORT_SUBJECT'))})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:LONG_SUBJECT1 spids:[142])
          op: Equal
          rhs: {(SQ <'this is a long subject that is virtually guaranteed'>)}
          spids: [142]
        )
      ]
      spids: [142]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:LONG_SUBJECT2 spids:[147])
          op: Equal
          rhs: {(SQ <'to require wrapping via format-patch if it is all'>)}
          spids: [147]
        )
      ]
      spids: [147]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:LONG_SUBJECT3 spids:[152])
          op: Equal
          rhs: {(SQ <'going to appear on a single line'>)}
          spids: [152]
        )
      ]
      spids: [152]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:LONG_SUBJECT spids:[157])
          op: Equal
          rhs: 
            {
              (DQ ($ VSub_Name '$LONG_SUBJECT1') (' ') ($ VSub_Name '$LONG_SUBJECT2') (' ') 
                ($ VSub_Name '$LONG_SUBJECT3')
              )
            }
          spids: [157]
        )
      ]
      spids: [157]
    )
    (C {(make_patches)} {(long)} {(DQ ($ VSub_Name '$LONG_SUBJECT'))})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:MULTILINE_SUBJECT spids:[175])
          op: Equal
          rhs: 
            {
              (DQ ($ VSub_Name '$LONG_SUBJECT1') ('\n') ($ VSub_Name '$LONG_SUBJECT2') ('\n') 
                ($ VSub_Name '$LONG_SUBJECT3')
              )
            }
          spids: [175]
        )
      ]
      spids: [175]
    )
    (C {(make_patches)} {(multiline)} {(DQ ($ VSub_Name '$MULTILINE_SUBJECT'))})
    (command.SimpleCommand
      words: [{(echo)} {(DQ ($ VSub_Name '$SHORT_SUBJECT'))}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})]
    )
    (C {(test_expect_success)} {(SQ <'short subject preserved (format-patch | am)'>)} 
      {(SQ <'\n'> <'\tcheck_subject short\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'short subject preserved (format-patch -k | am)'>)} 
      {(SQ <'\n'> <'\tcheck_subject short-k\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'short subject preserved (format-patch -k | am -k)'>)} 
      {(SQ <'\n'> <'\tcheck_subject short-k -k\n'>)}
    )
    (command.SimpleCommand
      words: [{(echo)} {(DQ ($ VSub_Name '$LONG_SUBJECT'))}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})]
    )
    (C {(test_expect_success)} {(SQ <'long subject preserved (format-patch | am)'>)} 
      {(SQ <'\n'> <'\tcheck_subject long\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'long subject preserved (format-patch -k | am)'>)} 
      {(SQ <'\n'> <'\tcheck_subject long-k\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'long subject preserved (format-patch -k | am -k)'>)} 
      {(SQ <'\n'> <'\tcheck_subject long-k -k\n'>)}
    )
    (command.SimpleCommand
      words: [{(echo)} {(DQ ($ VSub_Name '$LONG_SUBJECT'))}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})]
    )
    (C {(test_expect_success)} {(SQ <'multiline subject unwrapped (format-patch | am)'>)} 
      {(SQ <'\n'> <'\tcheck_subject multiline\n'>)}
    )
    (C {(test_expect_success)} {(SQ <'multiline subject unwrapped (format-patch -k | am)'>)} 
      {(SQ <'\n'> <'\tcheck_subject multiline-k\n'>)}
    )
    (command.SimpleCommand
      words: [{(echo)} {(DQ ($ VSub_Name '$MULTILINE_SUBJECT'))}]
      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)})]
    )
    (C {(test_expect_success)} {(SQ <'multiline subject preserved (format-patch -k | am -k)'>)} 
      {(SQ <'\n'> <'\tcheck_subject multiline-k -k\n'>)}
    )
    (C {(test_done)})
  ]
)