(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 <'Test wacky input to git config'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <setup>
      name: setup
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Subshell
              left: <Id.Op_LParen _>
              child: 
                (command.AndOr
                  children: [
                    (command.Simple
                      blame_tok: <printf>
                      more_env: []
                      words: [{<printf>} {(DQ <'[section]'> <Id.Lit_BadBackslash '\\'> <n>)}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <printf>
                      more_env: []
                      words: [{<printf>} {(DQ <'  key = foo'>)}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_DAmp _>]
                )
              right: <Id.Right_Subshell _>
              redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>})]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <check>
      name: check
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_Number 2))}]
              redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <git>
              more_env: []
              words: [{<git>} {<config>} {<--get>} {(DQ ($ Id.VSub_Number 1))}]
              redirects: [
                (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<actual>})
                (Redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
              ]
              do_fork: T
            )
            (command.Simple
              blame_tok: <test_cmp>
              more_env: []
              words: [{<test_cmp>} {<actual>} {<expected>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <check_regex>
      name: check_regex
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_Number 3))}]
              redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>})]
              do_fork: T
            )
            (command.Simple
              blame_tok: <git>
              more_env: []
              words: [{<git>} {<config>} {<--get>} {(DQ ($ Id.VSub_Number 1))} {(DQ ($ Id.VSub_Number 2))}]
              redirects: [
                (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<actual>})
                (Redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
              ]
              do_fork: T
            )
            (command.Simple
              blame_tok: <test_cmp>
              more_env: []
              words: [{<test_cmp>} {<actual>} {<expected>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'modify same key'>)}
        {
          (SQ <'\n'> <'\tsetup &&\n'> <'\tgit config section.key bar &&\n'> 
            <'\tcheck section.key bar\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'add key in same section'>)}
        {
          (SQ <'\n'> <'\tsetup &&\n'> <'\tgit config section.other bar &&\n'> 
            <'\tcheck section.key foo &&\n'> <'\tcheck section.other bar\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'add key in different section'>)}
        {
          (SQ <'\n'> <'\tsetup &&\n'> <'\tgit config section2.key bar &&\n'> 
            <'\tcheck section.key foo &&\n'> <'\tcheck section2.key bar\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'SECTION='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'SECTION='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SECTION='> name:SECTION)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <test.q> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <s> 
                (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'> ch:'\\') <'sq\'sp e.key'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'make sure git config escapes section names properly'>)}
        {(SQ <'\n'> <'\tgit config "$SECTION" bar &&\n'> <'\tcheck "$SECTION" bar\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'LONG_VALUE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'LONG_VALUE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'LONG_VALUE='> name:LONG_VALUE)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <printf>
                    more_env: []
                    words: [{<printf>} {(DQ <'x%01021dx a'>)} {<7>}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'do not crash on special long config line'>)}
        {
          (SQ <'\n'> <'\tsetup &&\n'> <'\tgit config section.key "$LONG_VALUE" &&\n'> 
            <'\tcheck section.key "$LONG_VALUE"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <setup_many>
      name: setup_many
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <setup>
                  more_env: []
                  words: [{<setup>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'.git/config'>}
                    )
                  ]
                  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: {<5to1>}
                    )
                    (Redir
                      op: <Id.Redir_DLessDash '<<-'>
                      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: [
                            <'  key = foo\n'>
                            <'  key = foo\n'>
                            <'  key = foo\n'>
                            <'  key = foo\n'>
                            <'  key = foo\n'>
                          ]
                        )
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <cat>
                  more_env: []
                  words: [{<cat>} {<5to1>} {<5to1>} {<5to1>} {<5to1>} {<5to1>}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<5to2>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <cat>
                  more_env: []
                  words: [{<cat>} {<5to2>} {<5to2>} {<5to2>} {<5to2>} {<5to2>}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<5to3>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <cat>
                  more_env: []
                  words: [{<cat>} {<5to3>} {<5to3>} {<5to3>} {<5to3>} {<5to3>}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<5to4>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <cat>
                  more_env: []
                  words: [{<cat>} {<5to4>} {<5to4>} {<5to4>} {<5to4>} {<5to4>}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'.git/config'>}
                    )
                  ]
                  do_fork: T
                )
              ]
              ops: [
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
              ]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'get many entries'>)}
        {
          (SQ <'\n'> <'\tsetup_many &&\n'> <'\tgit config --get-all section.key >actual &&\n'> 
            <'\ttest_line_count = 3126 actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'get many entries by regex'>)}
        {
          (SQ <'\n'> <'\tsetup_many &&\n'> <'\tgit config --get-regexp "sec.*ke." >actual &&\n'> 
            <'\ttest_line_count = 3126 actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'add and replace one of many entries'>)}
        {
          (SQ <'\n'> <'\tsetup_many &&\n'> <'\tgit config --add section.key bar &&\n'> 
            <'\tcheck_regex section.key "b.*r" bar &&\n'> <'\tgit config section.key beer "b.*r" &&\n'> <'\tcheck_regex section.key "b.*r" beer\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'replace many entries'>)}
        {
          (SQ <'\n'> <'\tsetup_many &&\n'> <'\tgit config --replace-all section.key bar &&\n'> 
            <'\tcheck section.key bar\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'unset many entries'>)}
        {
          (SQ <'\n'> <'\tsetup_many &&\n'> <'\tgit config --unset-all section.key &&\n'> 
            <'\ttest_must_fail git config section.key\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'--add appends new value after existing empty value'>)}
        {
          (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\n'> <'\n'> <'\tfool\n'> <'\troll\n'> <'\tEOF\n'> 
            <'\tcp .git/config .git/config.old &&\n'> <'\ttest_when_finished "mv .git/config.old .git/config" &&\n'> <'\tcat >.git/config <<-\\EOF &&\n'> 
            <'\t[foo]\n'> <'\t\tbaz\n'> <'\t\tbaz =\n'> <'\t\tbaz = fool\n'> <'\tEOF\n'> <'\tgit config --add foo.baz roll &&\n'> 
            <'\tgit config --get-all foo.baz >output &&\n'> <'\ttest_cmp expect output\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)