(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: 
            {
              (SQ <'git merge\n'> <'\n'> 
                <'Testing merge when using a custom message for the merge commit.'>
              )
            }
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: create_merge_msgs
      body: 
        (command.BraceGroup
          children: [
            (command.SimpleCommand
              words: [{(echo)} {(DQ ('custom message'))}]
              redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(exp.subject)})]
            )
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(cp)} {(exp.subject)} {(exp.log)})
                (command.SimpleCommand
                  words: [{(echo)} {(DQ )}]
                  redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(exp.log)})]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ("* tag 'c2':"))}]
                  redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(exp.log)})]
                )
                (command.SimpleCommand
                  words: [{(echo)} {(DQ ('  c2'))}]
                  redirects: [(redir.Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(exp.log)})]
                )
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(SQ <setup>)} 
      {
        (SQ <'\n'> <'\techo c0 > c0.c &&\n'> <'\tgit add c0.c &&\n'> <'\tgit commit -m c0 &&\n'> 
          <'\tgit tag c0 &&\n'> <'\techo c1 > c1.c &&\n'> <'\tgit add c1.c &&\n'> <'\tgit commit -m c1 &&\n'> <'\tgit tag c1 &&\n'> 
          <'\tgit reset --hard c0 &&\n'> <'\techo c2 > c2.c &&\n'> <'\tgit add c2.c &&\n'> <'\tgit commit -m c2 &&\n'> <'\tgit tag c2 &&\n'> 
          <'\tcreate_merge_msgs\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'merge c2 with a custom message'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard c1 &&\n'> <'\tgit merge -m "$(cat exp.subject)" c2 &&\n'> 
          <'\tgit cat-file commit HEAD | sed -e "1,/^$/d" >actual &&\n'> <'\ttest_cmp exp.subject actual\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'merge --log appends to custom message'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard c1 &&\n'> <'\tgit merge --log -m "$(cat exp.subject)" c2 &&\n'> 
          <'\tgit cat-file commit HEAD | sed -e "1,/^$/d" >actual &&\n'> <'\ttest_cmp exp.log actual\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)