(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-http-backend'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {(DQ ($ Id.VSub_DollarName TEST_DIRECTORY)) <'/lib-httpd.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <start_httpd>
      more_env: []
      words: [{<start_httpd>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <GET>
      name: GET
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <curl>
                  more_env: []
                  words: [
                    {<curl>}
                    {<--include>}
                    {
                      (DQ ($ Id.VSub_DollarName HTTPD_URL) <'/'> ($ Id.VSub_DollarName SMART) 
                        <'/repo.git/'> ($ Id.VSub_Number 1)
                      )
                    }
                  ]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<out>}
                    )
                    (Redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      blame_tok: <tr>
                      more_env: []
                      words: [{<tr>} {(SQ <'\\015'>)} {<Q>}]
                      redirects: [(Redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<out>})]
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <sed>
                      more_env: []
                      words: [{<sed>} {(SQ <'\n'> <'\t\ts/Q$//\n'> <'\t\t1q\n'> <'\t'>)}]
                      redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<act>})]
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _>]
                )
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {(DQ <'HTTP/1.1 '> ($ Id.VSub_Number 2))}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<exp>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<exp>} {<act>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <POST>
      name: POST
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <curl>
                  more_env: []
                  words: [
                    {<curl>}
                    {<--include>}
                    {<--data>}
                    {(DQ ($ Id.VSub_Number 2))}
                    {<--header>}
                    {(DQ <'Content-Type: application/x-'> ($ Id.VSub_Number 1) <-request>)}
                    {(DQ ($ Id.VSub_DollarName HTTPD_URL) <'/smart/repo.git/'> ($ Id.VSub_Number 1))}
                  ]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<out>}
                    )
                    (Redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      blame_tok: <tr>
                      more_env: []
                      words: [{<tr>} {(SQ <'\\015'>)} {<Q>}]
                      redirects: [(Redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<out>})]
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <sed>
                      more_env: []
                      words: [{<sed>} {(SQ <'\n'> <'\t\ts/Q$//\n'> <'\t\t1q\n'> <'\t'>)}]
                      redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<act>})]
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _>]
                )
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [{<echo>} {(DQ <'HTTP/1.1 '> ($ Id.VSub_Number 3))}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<exp>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<exp>} {<act>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {(DQ ($ Id.VSub_DollarName TEST_DIRECTORY)) <'/t556x_common'>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <grep>
      more_env: []
      words: [{<grep>} {(SQ <'^[^#]'>)}]
      redirects: [
        (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<exp>})
        (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: [
                <'\n'>
                <'###  refs/heads/master\n'>
                <'###\n'>
                <'GET  /smart/repo.git/refs/heads/master HTTP/1.1 404 -\n'>
                <'\n'>
                <'###  getanyfile default\n'>
                <'###\n'>
                <'GET  /smart/repo.git/HEAD HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/info/refs HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/objects/info/packs HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/objects/info/alternates HTTP/1.1 200 -\n'>
                <'GET  /smart/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName LOOSE_URL)
                <' HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName PACK_URL)
                <' HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName IDX_URL)
                <' HTTP/1.1 200\n'>
                <'\n'>
                <'###  no git-daemon-export-ok\n'>
                <'###\n'>
                <'GET  /smart_noexport/repo.git/HEAD HTTP/1.1 404 -\n'>
                <'GET  /smart_noexport/repo.git/info/refs HTTP/1.1 404 -\n'>
                <'GET  /smart_noexport/repo.git/objects/info/packs HTTP/1.1 404 -\n'>
                <'GET  /smart_noexport/repo.git/objects/info/alternates HTTP/1.1 404 -\n'>
                <'GET  /smart_noexport/repo.git/objects/info/http-alternates HTTP/1.1 404 -\n'>
                <'GET  /smart_noexport/repo.git/'>
                ($ Id.VSub_DollarName LOOSE_URL)
                <' HTTP/1.1 404 -\n'>
                <'GET  /smart_noexport/repo.git/'>
                ($ Id.VSub_DollarName PACK_URL)
                <' HTTP/1.1 404 -\n'>
                <'GET  /smart_noexport/repo.git/'>
                ($ Id.VSub_DollarName IDX_URL)
                <' HTTP/1.1 404 -\n'>
                <'\n'>
                <'###  git-daemon-export-ok\n'>
                <'###\n'>
                <'GET  /smart_noexport/repo.git/HEAD HTTP/1.1 200\n'>
                <'GET  /smart_noexport/repo.git/info/refs HTTP/1.1 200\n'>
                <'GET  /smart_noexport/repo.git/objects/info/packs HTTP/1.1 200\n'>
                <'GET  /smart_noexport/repo.git/objects/info/alternates HTTP/1.1 200 -\n'>
                <'GET  /smart_noexport/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n'>
                <'GET  /smart_noexport/repo.git/'>
                ($ Id.VSub_DollarName LOOSE_URL)
                <' HTTP/1.1 200\n'>
                <'GET  /smart_noexport/repo.git/'>
                ($ Id.VSub_DollarName PACK_URL)
                <' HTTP/1.1 200\n'>
                <'GET  /smart_noexport/repo.git/'>
                ($ Id.VSub_DollarName IDX_URL)
                <' HTTP/1.1 200\n'>
                <'\n'>
                <'###  getanyfile true\n'>
                <'###\n'>
                <'GET  /smart/repo.git/HEAD HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/info/refs HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/objects/info/packs HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/objects/info/alternates HTTP/1.1 200 -\n'>
                <'GET  /smart/repo.git/objects/info/http-alternates HTTP/1.1 200 -\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName LOOSE_URL)
                <' HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName PACK_URL)
                <' HTTP/1.1 200\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName IDX_URL)
                <' HTTP/1.1 200\n'>
                <'\n'>
                <'###  getanyfile false\n'>
                <'###\n'>
                <'GET  /smart/repo.git/HEAD HTTP/1.1 403 -\n'>
                <'GET  /smart/repo.git/info/refs HTTP/1.1 403 -\n'>
                <'GET  /smart/repo.git/objects/info/packs HTTP/1.1 403 -\n'>
                <'GET  /smart/repo.git/objects/info/alternates HTTP/1.1 403 -\n'>
                <'GET  /smart/repo.git/objects/info/http-alternates HTTP/1.1 403 -\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName LOOSE_URL)
                <' HTTP/1.1 403 -\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName PACK_URL)
                <' HTTP/1.1 403 -\n'>
                <'GET  /smart/repo.git/'>
                ($ Id.VSub_DollarName IDX_URL)
                <' HTTP/1.1 403 -\n'>
                <'\n'>
                <'###  uploadpack default\n'>
                <'###\n'>
                <'GET  /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200\n'>
                <'POST /smart/repo.git/git-upload-pack HTTP/1.1 200 -\n'>
                <'\n'>
                <'###  uploadpack true\n'>
                <'###\n'>
                <'GET  /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200\n'>
                <'POST /smart/repo.git/git-upload-pack HTTP/1.1 200 -\n'>
                <'\n'>
                <'###  uploadpack false\n'>
                <'###\n'>
                <'GET  /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 403 -\n'>
                <'POST /smart/repo.git/git-upload-pack HTTP/1.1 403 -\n'>
                <'\n'>
                <'###  receivepack default\n'>
                <'###\n'>
                <'GET  /smart/repo.git/info/refs?service=git-receive-pack HTTP/1.1 403 -\n'>
                <'POST /smart/repo.git/git-receive-pack HTTP/1.1 403 -\n'>
                <'\n'>
                <'###  receivepack true\n'>
                <'###\n'>
                <'GET  /smart/repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n'>
                <'POST /smart/repo.git/git-receive-pack HTTP/1.1 200 -\n'>
                <'\n'>
                <'###  receivepack false\n'>
                <'###\n'>
                <'GET  /smart/repo.git/info/refs?service=git-receive-pack HTTP/1.1 403 -\n'>
                <'POST /smart/repo.git/git-receive-pack HTTP/1.1 403 -\n'>
              ]
            )
        )
      ]
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'server request log matches test results'>)}
        {
          (SQ <'\n'> <'\tsed -e "\n'> <'\t\ts/^.* \\"//\n'> <'\t\ts/\\"//\n'> 
            <'\t\ts/ [1-9][0-9]*\\$//\n'> <'\t\ts/^GET /GET  /\n'> <'\t" >act <"$HTTPD_ROOT_PATH"/access.log &&\n'> <'\ttest_cmp exp act\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <stop_httpd>
      more_env: []
      words: [{<stop_httpd>}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)