(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 git config-set API in different settings'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <check_config>
      name: check_config
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [
                                {<test>}
                                {(DQ ($ Id.VSub_Number 1))}
                                {<Id.Lit_Equals '='>}
                                {<expect_code>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.AndOr
                          children: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'expect_code='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'expect_code='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'expect_code='>
                                      name: expect_code
                                    )
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_Number 2))}
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <shift>
                              more_env: []
                              words: [{<shift>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
                        )
                      ]
                      spids: [29 42]
                    )
                  ]
                  else_kw: <Id.KW_Else else>
                  else_action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'expect_code='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'expect_code='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'expect_code='>
                              name: expect_code
                            )
                          op: assign_op.Equal
                          rhs: {<0>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'op='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'op='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'op='> name:op)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_Number 1)}
                    )
                    (AssignPair
                      left: <Id.Lit_VarLike 'key='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'key='> name:key)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_Number 2)}
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <shift>
                  more_env: []
                  words: [{<shift>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <shift>
                  more_env: []
                  words: [{<shift>}]
                  redirects: []
                  do_fork: T
                )
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [
                                {<test>}
                                {($ Id.VSub_Pound '#')}
                                {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                                {<0>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.Simple
                          blame_tok: <printf>
                          more_env: []
                          words: [
                            {<printf>}
                            {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                            {(DQ ($ Id.VSub_At '@'))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      spids: [88 100]
                    )
                  ]
                  else_action: []
                  fi_kw: <Id.KW_Fi fi>
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})]
                )
                (command.Simple
                  blame_tok: <test_expect_code>
                  more_env: []
                  words: [
                    {<test_expect_code>}
                    {($ Id.VSub_DollarName expect_code)}
                    {<test-config>}
                    {(DQ ($ Id.VSub_DollarName op))}
                    {(DQ ($ Id.VSub_DollarName key))}
                  ]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<actual>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<expect>} {<actual>}]
                  redirects: []
                  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 <'setup default config'>)}
        {
          (SQ <'\n'> <'\tcat >.git/config <<-\\EOF\n'> <'\t[case]\n'> <'\t\tpenguin = very blue\n'> 
            <'\t\tMovie = BadPhysics\n'> <'\t\tUPPERCASE = true\n'> <'\t\tMixedCase = true\n'> <'\t\tmy =\n'> <'\t\tfoo\n'> <'\t\tbaz = sam\n'> 
            <'\t[Cores]\n'> <'\t\tWhatEver = Second\n'> <'\t\tbaz = bar\n'> <'\t[cores]\n'> <'\t\tbaz = bat\n'> <'\t[CORES]\n'> 
            <'\t\tbaz = ball\n'> <'\t[my "Foo bAr"]\n'> <'\t\thi = mixed-case\n'> <'\t[my "FOO BAR"]\n'> <'\t\thi = upper-case\n'> 
            <'\t[my "foo bar"]\n'> <'\t\thi = lower-case\n'> <'\t[case]\n'> <'\t\tbaz = bat\n'> <'\t\tbaz = hask\n'> <'\t[lamb]\n'> 
            <'\t\tchop = 65\n'> <'\t\thead = none\n'> <'\t[goat]\n'> <'\t\tlegs = 4\n'> <'\t\thead = true\n'> <'\t\tskin = false\n'> 
            <'\t\tnose = 1\n'> <'\t\thorns\n'> <'\tEOF\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'get value for a simple key'>)}
        {(SQ <'\n'> <'\tcheck_config get_value case.penguin "very blue"\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'get value for a key with value as an empty string'>)}
        {(SQ <'\n'> <'\tcheck_config get_value case.my ""\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'get value for a key with value as NULL'>)}
        {(SQ <'\n'> <'\tcheck_config get_value case.foo "(NULL)"\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'upper case key'>)}
        {
          (SQ <'\n'> <'\tcheck_config get_value case.UPPERCASE "true" &&\n'> 
            <'\tcheck_config get_value case.uppercase "true"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'mixed case key'>)}
        {
          (SQ <'\n'> <'\tcheck_config get_value case.MixedCase "true" &&\n'> 
            <'\tcheck_config get_value case.MIXEDCASE "true" &&\n'> <'\tcheck_config get_value case.mixedcase "true"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'key and value with mixed case'>)}
        {(SQ <'\n'> <'\tcheck_config get_value case.Movie "BadPhysics"\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'key with case sensitive subsection'>)}
        {
          (SQ <'\n'> <'\tcheck_config get_value "my.Foo bAr.hi" "mixed-case" &&\n'> 
            <'\tcheck_config get_value "my.FOO BAR.hi" "upper-case" &&\n'> <'\tcheck_config get_value "my.foo bar.hi" "lower-case"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'key with case insensitive section header'>)}
        {
          (SQ <'\n'> <'\tcheck_config get_value cores.baz "ball" &&\n'> 
            <'\tcheck_config get_value Cores.baz "ball" &&\n'> <'\tcheck_config get_value CORES.baz "ball" &&\n'> <'\tcheck_config get_value coreS.baz "ball"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'key with case insensitive section header & variable'>)}
        {
          (SQ <'\n'> <'\tcheck_config get_value CORES.BAZ "ball" &&\n'> 
            <'\tcheck_config get_value cores.baz "ball" &&\n'> <'\tcheck_config get_value cores.BaZ "ball" &&\n'> <'\tcheck_config get_value cOreS.bAz "ball"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find value with misspelled key'>)}
        {
          (SQ <'\n'> 
            <
'\tcheck_config expect_code 1 get_value "my.fOo Bar.hi" "Value not found for \\"my.fOo Bar.hi\\""\n'
            >
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find value with the highest priority'>)}
        {(SQ <'\n'> <'\tcheck_config get_value case.baz "hask"\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find integer value for a key'>)}
        {(SQ <'\n'> <'\tcheck_config get_int lamb.chop 65\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find string value for a key'>)}
        {
          (SQ <'\n'> <'\tcheck_config get_string case.baz hask &&\n'> 
            <
'\tcheck_config expect_code 1 get_string case.ba "Value not found for \\"case.ba\\""\n'
            >
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check line error when NULL string is queried'>)}
        {
          (SQ <'\n'> <'\ttest_expect_code 128 test-config get_string case.foo 2>result &&\n'> 
            <'\ttest_i18ngrep "fatal: .*case\\.foo.*\\.git/config.*line 7" result\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find integer if value is non parse-able'>)}
        {(SQ <'\n'> <'\tcheck_config expect_code 128 get_int lamb.head\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find bool value for the entered key'>)}
        {
          (SQ <'\n'> <'\tcheck_config get_bool goat.head 1 &&\n'> 
            <'\tcheck_config get_bool goat.skin 0 &&\n'> <'\tcheck_config get_bool goat.nose 1 &&\n'> <'\tcheck_config get_bool goat.horns 1 &&\n'> 
            <'\tcheck_config get_bool goat.legs 1\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find multiple values'>)}
        {(SQ <'\n'> <'\tcheck_config get_value_multi case.baz sam bat hask\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find value from a configset'>)}
        {
          (SQ <'\n'> <'\tcat >config2 <<-\\EOF &&\n'> <'\t[case]\n'> <'\t\tbaz = lama\n'> <'\t[my]\n'> 
            <'\t\tnew = silk\n'> <'\t[case]\n'> <'\t\tbaz = ball\n'> <'\tEOF\n'> <'\techo silk >expect &&\n'> 
            <'\ttest-config configset_get_value my.new config2 .git/config >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find value with highest priority from a configset'>)}
        {
          (SQ <'\n'> <'\techo hask >expect &&\n'> 
            <'\ttest-config configset_get_value case.baz config2 .git/config >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'find value_list for a key from a configset'>)}
        {
          (SQ <'\n'> <'\tcat >except <<-\\EOF &&\n'> <'\tsam\n'> <'\tbat\n'> <'\thask\n'> <'\tlama\n'> 
            <'\tball\n'> <'\tEOF\n'> <'\ttest-config configset_get_value case.baz config2 .git/config >actual &&\n'> 
            <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'proper error on non-existent files'>)}
        {
          (SQ <'\n'> 
            <'\techo "Error (-1) reading configuration file non-existent-file." >expect &&\n'> <'\ttest_expect_code 2 test-config configset_get_value foo.bar non-existent-file 2>actual &&\n'> 
            <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<POSIXPERM> <Id.Lit_Comma ','> <SANITY>}
        {(SQ <'proper error on non-accessible files'>)}
        {
          (SQ <'\n'> <'\tchmod -r .git/config &&\n'> 
            <'\ttest_when_finished "chmod +r .git/config" &&\n'> <'\techo "Error (-1) reading configuration file .git/config." >expect &&\n'> 
            <
'\ttest_expect_code 2 test-config configset_get_value foo.bar .git/config 2>actual &&\n'
            > <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'proper error on error in default config files'>)}
        {
          (SQ <'\n'> <'\tcp .git/config .git/config.old &&\n'> 
            <'\ttest_when_finished "mv .git/config.old .git/config" &&\n'> <'\techo "[" >>.git/config &&\n'> 
            <'\techo "fatal: bad config line 34 in file .git/config" >expect &&\n'> <'\ttest_expect_code 128 test-config get_value foo.bar 2>actual &&\n'> 
            <'\ttest_i18ncmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'proper error on error in custom config files'>)}
        {
          (SQ <'\n'> <'\techo "[" >>syntax-error &&\n'> 
            <'\techo "fatal: bad config line 1 in file syntax-error" >expect &&\n'> <'\ttest_expect_code 128 test-config configset_get_value foo.bar syntax-error 2>actual &&\n'> 
            <'\ttest_i18ncmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'check line errors for malformed values'>)}
        {
          (SQ <'\n'> <'\tmv .git/config .git/config.old &&\n'> 
            <'\ttest_when_finished "mv .git/config.old .git/config" &&\n'> <'\tcat >.git/config <<-\\EOF &&\n'> <'\t[alias]\n'> <'\t\tbr\n'> <'\tEOF\n'> 
            <'\ttest_expect_code 128 git br 2>result &&\n'> <'\ttest_i18ngrep "fatal: .*alias\\.br.*\\.git/config.*line 2" result\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'error on modifying repo config without repo'>)}
        {
          (SQ <'\n'> <'\tmkdir no-repo &&\n'> <'\t(\n'> <'\t\tGIT_CEILING_DIRECTORIES=$(pwd) &&\n'> 
            <'\t\texport GIT_CEILING_DIRECTORIES &&\n'> <'\t\tcd no-repo &&\n'> <'\t\ttest_must_fail git config a.b c 2>err &&\n'> 
            <'\t\tgrep "not in a git directory" err\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'cmdline_config='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'cmdline_config='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cmdline_config='> name:cmdline_config)
          op: assign_op.Equal
          rhs: {(DQ <'\'foo.bar=from-cmdline\''>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'iteration shows correct origins'>)}
        {
          (SQ <'\n'> <'\techo "[foo]bar = from-repo" >.git/config &&\n'> 
            <'\techo "[foo]bar = from-home" >.gitconfig &&\n'> <'\tif test_have_prereq MINGW\n'> <'\tthen\n'> <'\t\t# Use Windows path (i.e. *not* $HOME)\n'> 
            <'\t\tHOME_GITCONFIG=$(pwd)/.gitconfig\n'> <'\telse\n'> <'\t\t# Do not get fooled by symbolic links, i.e. $HOME != $(pwd)\n'> 
            <'\t\tHOME_GITCONFIG=$HOME/.gitconfig\n'> <'\tfi &&\n'> <'\tcat >expect <<-EOF &&\n'> <'\tkey=foo.bar\n'> <'\tvalue=from-home\n'> 
            <'\torigin=file\n'> <'\tname=$HOME_GITCONFIG\n'> <'\tscope=global\n'> <'\n'> <'\tkey=foo.bar\n'> <'\tvalue=from-repo\n'> 
            <'\torigin=file\n'> <'\tname=.git/config\n'> <'\tscope=repo\n'> <'\n'> <'\tkey=foo.bar\n'> <'\tvalue=from-cmdline\n'> 
            <'\torigin=command line\n'> <'\tname=\n'> <'\tscope=cmdline\n'> <'\tEOF\n'> 
            <'\tGIT_CONFIG_PARAMETERS=$cmdline_config test-config iterate >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)