(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'test auto-generated merge messages'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (command.ShFunction
      name: check_oneline
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.Pipeline
                  children: [
                    (C {<echo>} {(DQ ($ Id.VSub_Number '$1'))})
                    (command.Simple
                      words: [{<sed>} {(DQ <'s/Q/\'/g'>)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<expect>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  negated: F
                )
                (command.Simple
                  words: [
                    {<git>}
                    {<log>}
                    {<-1>}
                    {<--pretty> <Id.Lit_Equals '='> <tformat> <Id.Lit_Colon ':'> <Id.Lit_Other '%'> <s>}
                  ]
                  redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<actual>})]
                  do_fork: T
                )
                (C {<test_cmp>} {<expect>} {<actual>})
              ]
            )
          ]
        )
    )
    (C {<test_expect_success>} {(SQ <'merge local branch'>)} 
      {
        (SQ <'\n'> <'\ttest_commit master-1 &&\n'> <'\tgit checkout -b local-branch &&\n'> 
          <'\ttest_commit branch-1 &&\n'> <'\tgit checkout master &&\n'> <'\ttest_commit master-2 &&\n'> <'\tgit merge local-branch &&\n'> 
          <'\tcheck_oneline "Merge branch Qlocal-branchQ"\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'merge octopus branches'>)} 
      {
        (SQ <'\n'> <'\tgit checkout -b octopus-a master &&\n'> <'\ttest_commit octopus-1 &&\n'> 
          <'\tgit checkout -b octopus-b master &&\n'> <'\ttest_commit octopus-2 &&\n'> <'\tgit checkout master &&\n'> 
          <'\tgit merge octopus-a octopus-b &&\n'> <'\tcheck_oneline "Merge branches Qoctopus-aQ and Qoctopus-bQ"\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'merge tag'>)} 
      {
        (SQ <'\n'> <'\tgit checkout -b tag-branch master &&\n'> <'\ttest_commit tag-1 &&\n'> 
          <'\tgit checkout master &&\n'> <'\ttest_commit master-3 &&\n'> <'\tgit merge tag-1 &&\n'> <'\tcheck_oneline "Merge tag Qtag-1Q"\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'ambiguous tag'>)} 
      {
        (SQ <'\n'> <'\tgit checkout -b ambiguous master &&\n'> <'\ttest_commit ambiguous &&\n'> 
          <'\tgit checkout master &&\n'> <'\ttest_commit master-4 &&\n'> <'\tgit merge ambiguous &&\n'> 
          <'\tcheck_oneline "Merge tag QambiguousQ"\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'remote-tracking branch'>)} 
      {
        (SQ <'\n'> <'\tgit checkout -b remote master &&\n'> <'\ttest_commit remote-1 &&\n'> 
          <'\tgit update-ref refs/remotes/origin/master remote &&\n'> <'\tgit checkout master &&\n'> <'\ttest_commit master-5 &&\n'> <'\tgit merge origin/master &&\n'> 
          <'\tcheck_oneline "Merge remote-tracking branch Qorigin/masterQ"\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)