(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ (Token id:Id.Lit_Chars val:'git rebase --abort tests' span_id:6))}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:work_dir)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:20)
                  command_list: (command.CommandList children:[(C {(pwd)})])
                ) ('/test dir')
              )
            }
          spids: [18]
        )
      ]
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:32) 
          (Token id:Id.Lit_Chars val:'\tmkdir -p "$work_dir" &&\n' span_id:33) (Token id:Id.Lit_Chars val:'\tcd "$work_dir" &&\n' span_id:34) 
          (Token id:Id.Lit_Chars val:'\tgit init &&\n' span_id:35) (Token id:Id.Lit_Chars val:'\techo a > a &&\n' span_id:36) 
          (Token id:Id.Lit_Chars val:'\tgit add a &&\n' span_id:37) (Token id:Id.Lit_Chars val:'\tgit commit -m a &&\n' span_id:38) 
          (Token id:Id.Lit_Chars val:'\tgit branch to-rebase &&\n' span_id:39) (Token id:Id.Lit_Chars val:'\n' span_id:40) (Token id:Id.Lit_Chars val:'\techo b > a &&\n' span_id:41) 
          (Token id:Id.Lit_Chars val:'\tgit commit -a -m b &&\n' span_id:42) (Token id:Id.Lit_Chars val:'\techo c > a &&\n' span_id:43) 
          (Token id:Id.Lit_Chars val:'\tgit commit -a -m c &&\n' span_id:44) (Token id:Id.Lit_Chars val:'\n' span_id:45) 
          (Token id:Id.Lit_Chars val:'\tgit checkout to-rebase &&\n' span_id:46) (Token id:Id.Lit_Chars val:'\techo d > a &&\n' span_id:47) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit commit -a -m "merge should fail on this" &&\n'
            span_id: 48
          ) (Token id:Id.Lit_Chars val:'\techo e > a &&\n' span_id:49) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit commit -a -m "merge should fail on this, too" &&\n'
            span_id: 50
          ) (Token id:Id.Lit_Chars val:'\tgit branch pre-rebase\n' span_id:51)
        )
      }
    )
    (command.ShFunction
      name: testrebase
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:type)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [62]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:dotest)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [66]
                )
              ]
            )
            (C {(test_expect_success)} {(DQ (rebase) ($ Id.VSub_DollarName '$type') (' --abort'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:80) 
                  (Token id:Id.Lit_Chars val:'\t\tcd "$work_dir" &&\n' span_id:81) (Token id:Id.Lit_Chars val:'\t\t# Clean up the state from the previous one\n' span_id:82) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tgit reset --hard pre-rebase &&\n'
                    span_id: 83
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_must_fail git rebase$type master &&\n' span_id:84) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_path_is_dir "$dotest" &&\n'
                    span_id: 85
                  ) (Token id:Id.Lit_Chars val:'\t\tgit rebase --abort &&\n' span_id:86) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n'
                    span_id: 87
                  ) (Token id:Id.Lit_Chars val:'\t\ttest ! -d "$dotest"\n' span_id:88) 
                  (Token id:Id.Lit_Chars val:'\t' span_id:89)
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ (rebase) ($ Id.VSub_DollarName '$type') (' --abort after --skip'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:103) 
                  (Token id:Id.Lit_Chars val:'\t\tcd "$work_dir" &&\n' span_id:104) (Token id:Id.Lit_Chars val:'\t\t# Clean up the state from the previous one\n' span_id:105) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tgit reset --hard pre-rebase &&\n'
                    span_id: 106
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_must_fail git rebase$type master &&\n' span_id:107) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_path_is_dir "$dotest" &&\n'
                    span_id: 108
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_must_fail git rebase --skip &&\n' span_id:109) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest $(git rev-parse HEAD) = $(git rev-parse master) &&\n'
                    span_id: 110
                  ) (Token id:Id.Lit_Chars val:'\t\tgit rebase --abort &&\n' span_id:111) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n'
                    span_id: 112
                  ) (Token id:Id.Lit_Chars val:'\t\ttest ! -d "$dotest"\n' span_id:113) 
                  (Token id:Id.Lit_Chars val:'\t' span_id:114)
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ (rebase) ($ Id.VSub_DollarName '$type') (' --abort after --continue'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:128) 
                  (Token id:Id.Lit_Chars val:'\t\tcd "$work_dir" &&\n' span_id:129) (Token id:Id.Lit_Chars val:'\t\t# Clean up the state from the previous one\n' span_id:130) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tgit reset --hard pre-rebase &&\n'
                    span_id: 131
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_must_fail git rebase$type master &&\n' span_id:132) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_path_is_dir "$dotest" &&\n'
                    span_id: 133
                  ) (Token id:Id.Lit_Chars val:'\t\techo c > a &&\n' span_id:134) 
                  (Token id:Id.Lit_Chars val:'\t\techo d >> a &&\n' span_id:135) (Token id:Id.Lit_Chars val:'\t\tgit add a &&\n' span_id:136) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_must_fail git rebase --continue &&\n'
                    span_id: 137
                  ) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest $(git rev-parse HEAD) != $(git rev-parse master) &&\n'
                    span_id: 138
                  ) (Token id:Id.Lit_Chars val:'\t\tgit rebase --abort &&\n' span_id:139) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&\n'
                    span_id: 140
                  ) (Token id:Id.Lit_Chars val:'\t\ttest ! -d "$dotest"\n' span_id:141) 
                  (Token id:Id.Lit_Chars val:'\t' span_id:142)
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ (rebase) ($ Id.VSub_DollarName '$type') (' --abort does not update reflog'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:156) 
                  (Token id:Id.Lit_Chars val:'\t\tcd "$work_dir" &&\n' span_id:157) (Token id:Id.Lit_Chars val:'\t\t# Clean up the state from the previous one\n' span_id:158) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tgit reset --hard pre-rebase &&\n'
                    span_id: 159
                  ) (Token id:Id.Lit_Chars val:'\t\tgit reflog show to-rebase > reflog_before &&\n' span_id:160) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_must_fail git rebase$type master &&\n'
                    span_id: 161
                  ) (Token id:Id.Lit_Chars val:'\t\tgit rebase --abort &&\n' span_id:162) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tgit reflog show to-rebase > reflog_after &&\n'
                    span_id: 163
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp reflog_before reflog_after &&\n' span_id:164) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\trm reflog_before reflog_after\n'
                    span_id: 165
                  ) (Token id:Id.Lit_Chars val:'\t' span_id:166)
                )
              }
            )
            (C {(test_expect_success)} 
              {
                (SQ 
                  (Token
                    id: Id.Lit_Chars
                    val: 'rebase --abort can not be used with other options'
                    span_id: 174
                  )
                )
              } 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:178) 
                  (Token id:Id.Lit_Chars val:'\t\tcd "$work_dir" &&\n' span_id:179) (Token id:Id.Lit_Chars val:'\t\t# Clean up the state from the previous one\n' span_id:180) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tgit reset --hard pre-rebase &&\n'
                    span_id: 181
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_must_fail git rebase$type master &&\n' span_id:182) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_must_fail git rebase -v --abort &&\n'
                    span_id: 183
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_must_fail git rebase --abort -v &&\n' span_id:184) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tgit rebase --abort\n'
                    span_id: 185
                  ) (Token id:Id.Lit_Chars val:'\t' span_id:186)
                )
              }
            )
          ]
        )
    )
    (C {(testrebase)} {(DQ )} {(.git/rebase-apply)})
    (C {(testrebase)} {(DQ (' --merge'))} {(.git/rebase-merge)})
    (C {(test_done)})
  ]
)