(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'test_description='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'test_description='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git reset --patch'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./lib-patch-mode.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<PERL>}
        {(SQ <setup>)}
        {
          (SQ <'\n'> <'\tmkdir dir &&\n'> <'\techo parent > dir/foo &&\n'> <'\techo dummy > bar &&\n'> 
            <'\tgit add dir &&\n'> <'\tgit commit -m initial &&\n'> <'\ttest_tick &&\n'> <'\ttest_commit second dir/foo head &&\n'> 
            <'\tset_and_save_state bar bar_work bar_index &&\n'> <'\tsave_head\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<PERL>}
        {(SQ <'saying "n" does nothing'>)}
        {
          (SQ <'\n'> <'\tset_and_save_state dir/foo work work &&\n'> 
            <'\t(echo n; echo n) | git reset -p &&\n'> <'\tverify_saved_state dir/foo &&\n'> <'\tverify_saved_state bar\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<PERL>}
        {(SQ <'git reset -p'>)}
        {
          (SQ <'\n'> <'\t(echo n; echo y) | git reset -p >output &&\n'> 
            <'\tverify_state dir/foo work head &&\n'> <'\tverify_saved_state bar &&\n'> <'\ttest_i18ngrep "Unstage" output\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<PERL>}
        {(SQ <'git reset -p HEAD^'>)}
        {
          (SQ <'\n'> <'\t(echo n; echo y) | git reset -p HEAD^ >output &&\n'> 
            <'\tverify_state dir/foo work parent &&\n'> <'\tverify_saved_state bar &&\n'> <'\ttest_i18ngrep "Apply" output\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<PERL>}
        {(SQ <'git reset -p dir'>)}
        {
          (SQ <'\n'> <'\tset_state dir/foo work work &&\n'> 
            <'\t(echo y; echo n) | git reset -p dir &&\n'> <'\tverify_state dir/foo work head &&\n'> <'\tverify_saved_state bar\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<PERL>}
        {(SQ <'git reset -p -- foo (inside dir)'>)}
        {
          (SQ <'\n'> <'\tset_state dir/foo work work &&\n'> 
            <'\t(echo y; echo n) | (cd dir && git reset -p -- foo) &&\n'> <'\tverify_state dir/foo work head &&\n'> <'\tverify_saved_state bar\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<PERL>}
        {(SQ <'git reset -p HEAD^ -- dir'>)}
        {
          (SQ <'\n'> <'\t(echo y; echo n) | git reset -p HEAD^ -- dir &&\n'> 
            <'\tverify_state dir/foo work parent &&\n'> <'\tverify_saved_state bar\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<PERL>}
        {(SQ <'none of this moved HEAD'>)}
        {(SQ <'\n'> <'\tverify_saved_head\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)