(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 <'add -e basic tests'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<file>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [
                <'LO, praise of the prowess of people-kings\n'>
                <'of spear-armed Danes, in days long sped,\n'>
                <'we have heard, and what honor the athelings won!\n'>
                <'Oft Scyld the Scefing from squadroned foes,\n'>
                <'from many a tribe, the mead-bench tore,\n'>
                <'awing the earls. Since erst he lay\n'>
                <'friendless, a foundling, fate repaid him:\n'>
                <'for he waxed under welkin, in wealth he throve,\n'>
                <'till before him the folk, both far and near,\n'>
                <'who house by the whale-path, heard his mandate,\n'>
                <'gave him gifts:  a good king he!\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<second-part>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [
                <'To him an heir was afterward born,\n'>
                <'a son in his halls, whom heaven sent\n'>
                <'to favor the folk, feeling their woe\n'>
                <'that erst they had lacked an earl for leader\n'>
                <'so long a while; the Lord endowed him,\n'>
                <'the Wielder of Wonder, with world\'s renown.\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <setup>)}
        {
          (SQ <'\n'> <'\n'> <'\tgit add file &&\n'> <'\ttest_tick &&\n'> 
            <'\tgit commit -m initial file\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected-patch>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [
                <'diff --git a/file b/file\n'>
                <'index b9834b5..9020acb 100644\n'>
                <'--- a/file\n'>
                <'+++ b/file\n'>
                <'@@ -1,11 +1,6 @@\n'>
                <'-LO, praise of the prowess of people-kings\n'>
                <'-of spear-armed Danes, in days long sped,\n'>
                <'-we have heard, and what honor the athelings won!\n'>
                <'-Oft Scyld the Scefing from squadroned foes,\n'>
                <'-from many a tribe, the mead-bench tore,\n'>
                <'-awing the earls. Since erst he lay\n'>
                <'-friendless, a foundling, fate repaid him:\n'>
                <'-for he waxed under welkin, in wealth he throve,\n'>
                <'-till before him the folk, both far and near,\n'>
                <'-who house by the whale-path, heard his mandate,\n'>
                <'-gave him gifts:  a good king he!\n'>
                <'+To him an heir was afterward born,\n'>
                <'+a son in his halls, whom heaven sent\n'>
                <'+to favor the folk, feeling their woe\n'>
                <'+that erst they had lacked an earl for leader\n'>
                <'+so long a while; the Lord endowed him,\n'>
                <'+the Wielder of Wonder, with world\'s renown.\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<patch>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [
                <'diff --git a/file b/file\n'>
                <'index b9834b5..ef6e94c 100644\n'>
                <'--- a/file\n'>
                <'+++ b/file\n'>
                <'@@ -3,1 +3,333 @@ of spear-armed Danes, in days long sped,\n'>
                <' we have heard, and what honor the athelings won!\n'>
                <'+\n'>
                <' Oft Scyld the Scefing from squadroned foes,\n'>
                <'@@ -2,7 +1,5 @@ awing the earls. Since erst he lay\n'>
                <' friendless, a foundling, fate repaid him:\n'>
                <'+\n'>
                <' for he waxed under welkin, in wealth he throve,\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {<EOF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [
                <'diff --git a/file b/file\n'>
                <'index b9834b5..ef6e94c 100644\n'>
                <'--- a/file\n'>
                <'+++ b/file\n'>
                <'@@ -1,10 +1,12 @@\n'>
                <' LO, praise of the prowess of people-kings\n'>
                <' of spear-armed Danes, in days long sped,\n'>
                <' we have heard, and what honor the athelings won!\n'>
                <'+\n'>
                <' Oft Scyld the Scefing from squadroned foes,\n'>
                <' from many a tribe, the mead-bench tore,\n'>
                <' awing the earls. Since erst he lay\n'>
                <' friendless, a foundling, fate repaid him:\n'>
                <'+\n'>
                <' for he waxed under welkin, in wealth he throve,\n'>
                <' till before him the folk, both far and near,\n'>
                <' who house by the whale-path, heard his mandate,\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <echo>
      more_env: []
      words: [{<echo>} {(DQ <'#!'> ($ Id.VSub_DollarName SHELL_PATH))}]
      redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<fake-editor.sh>})]
      do_fork: T
    )
    (command.Simple
      blame_tok: <cat>
      more_env: []
      words: [{<cat>}]
      redirects: [
        (Redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<fake-editor.sh>})
        (Redir
          op: <Id.Redir_DLess '<<'>
          loc: (redir_loc.Fd fd:0)
          arg: 
            (redir_param.HereDoc
              here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>}
              here_end_tok: <Id.Undefined_Tok ''>
              stdin_parts: [<'mv -f "$1" orig-patch &&\n'> <'mv -f patch "$1"\n'>]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_set_editor>
      more_env: []
      words: [
        {<test_set_editor>}
        {
          (DQ 
            (CommandSub
              left_token: <Id.Left_DollarParen '$('>
              child: 
                (command.Simple
                  blame_tok: <pwd>
                  more_env: []
                  words: [{<pwd>}]
                  redirects: []
                  do_fork: T
                )
              right: <Id.Eof_RParen _>
            ) <'/fake-editor.sh'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <chmod>
      more_env: []
      words: [{<chmod>} {<a> <Id.Lit_Other '+'> <x>} {<fake-editor.sh>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'add -e'>)}
        {
          (SQ <'\n'> <'\n'> <'\tcp second-part file &&\n'> <'\tgit add -e &&\n'> 
            <'\ttest_cmp second-part file &&\n'> <'\ttest_cmp orig-patch expected-patch &&\n'> <'\tgit diff --cached > out &&\n'> 
            <'\ttest_cmp out expected\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'add -e notices editor failure'>)}
        {
          (SQ <'\n'> <'\tgit reset --hard &&\n'> <'\techo change >>file &&\n'> 
            <'\ttest_must_fail env GIT_EDITOR=false git add -e &&\n'> <'\ttest_expect_code 1 git diff --exit-code\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)