(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git svn propset tests'>)}
          spids: [13]
        )
      ]
    )
    (C {<.>} {<./lib-git-svn.sh>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:foo_subdir2)
          op: assign_op.Equal
          rhs: {(DQ <subdir/subdir2/foo_subdir2>)}
          spids: [24]
        )
      ]
    )
    (C {<Id.KW_Set set>} {<-e>})
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<mkdir>} {<import>})
        (command.Subshell
          command_list: 
            (command.CommandList
              children: [
                (command.Sentence
                  child: (C {<Id.KW_Set set>} {<-e>})
                  terminator: <Id.Op_Semi _>
                )
                (C {<cd>} {<import>})
                (C {<mkdir>} {<subdir>})
                (C {<mkdir>} {<subdir/subdir2>})
                (C {<touch>} {<foo>})
                (C {<touch>} {<subdir/foo_subdir>})
                (C {<touch>} {(DQ ($ Id.VSub_DollarName '$foo_subdir2'))})
                (command.Simple
                  words: [
                    {<svn_cmd>}
                    {<import>}
                    {<-m>}
                    {(SQ <'import for git svn'>)}
                    {<.>}
                    {(DQ ($ Id.VSub_DollarName '$svnrepo'))}
                  ]
                  redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{</dev/null>})]
                )
              ]
            )
        )
      ]
    )
    (C {<rm>} {<-rf>} {<import>})
    (C {<test_expect_success>} {(SQ <'initialize git svn'>)} 
      {(SQ <'\n'> <'\tgit svn init "$svnrepo"\n'> <'\t'>)}
    )
    (C {<test_expect_success>} {(SQ <'fetch revisions from svn'>)} 
      {(SQ <'\n'> <'\tgit svn fetch\n'> <'\t'>)}
    )
    (command.ShFunction
      name: set_props
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:subdir)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [150]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [156]
                )
              ]
            )
            (command.Sentence child:(C {<shift>}) terminator:<Id.Op_Semi _>)
            (command.Sentence child:(C {<shift>}) terminator:<Id.Op_Semi _>)
            (command.Subshell
              command_list: 
                (command.CommandList
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
                      children: [
                        (C {<cd>} {(DQ ($ Id.VSub_DollarName '$subdir'))})
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          body: 
                            (command.DoGroup
                              children: [
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<git>} {<svn>} {<propset>} {(DQ ($ Id.VSub_Number '$1'))} 
                                      {(DQ ($ Id.VSub_Number '$2'))} {(DQ ($ Id.VSub_DollarName '$file'))}
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Exit exit>
                                      arg_word: {<1>}
                                    )
                                  ]
                                )
                                (command.Sentence
                                  child: (C {<shift>})
                                  terminator: <Id.Op_Semi _>
                                )
                                (command.Sentence
                                  child: (C {<shift>})
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                        )
                        (command.Simple
                          words: [{<echo>} {<hello>}]
                          redirects: [
                            (redir.Redir
                              op: <Id.Redir_DGreat '>>'>
                              fd: -1
                              arg_word: {(DQ ($ Id.VSub_DollarName '$file'))}
                            )
                          ]
                        )
                        (C {<git>} {<commit>} {<-m>} {(DQ <'testing propset'>)} 
                          {(DQ ($ Id.VSub_DollarName '$file'))}
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: confirm_props
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:subdir)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [270]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [276]
                )
              ]
            )
            (command.Sentence child:(C {<shift>}) terminator:<Id.Op_Semi _>)
            (command.Sentence child:(C {<shift>}) terminator:<Id.Op_Semi _>)
            (command.Subshell
              command_list: 
                (command.CommandList
                  children: [
                    (command.Sentence
                      child: (C {<Id.KW_Set set>} {<-e>})
                      terminator: <Id.Op_Semi _>
                    )
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<cd>} {(DQ <svn_project/> ($ Id.VSub_DollarName '$subdir'))})
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          body: 
                            (command.DoGroup
                              children: [
                                (command.AndOr
                                  ops: [Id.Op_DPipe]
                                  children: [
                                    (C {<test>} 
                                      {
                                        (DQ 
                                          (command_sub
                                            left_token: <Id.Left_DollarParen '$('>
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {<svn_cmd>} {<propget>} 
                                                    {(DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_DollarName '$file'))}
                                                  )
                                                ]
                                              )
                                          )
                                        )
                                      } {<Id.Lit_Equals '='>} {(DQ ($ Id.VSub_Number '$2'))}
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Exit exit>
                                      arg_word: {<1>}
                                    )
                                  ]
                                )
                                (command.Sentence
                                  child: (C {<shift>})
                                  terminator: <Id.Op_Semi _>
                                )
                                (command.Sentence
                                  child: (C {<shift>})
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (C {<test_expect_success>} {(SQ <'add props top level'>)} 
      {
        (SQ <'\n'> <'\tset_props "." "foo" "svn:keywords" "FreeBSD=%H" &&\n'> 
          <'\tgit svn dcommit &&\n'> <'\tsvn_cmd co "$svnrepo" svn_project &&\n'> 
          <'\tconfirm_props "." "foo" "svn:keywords" "FreeBSD=%H" &&\n'> <'\trm -rf svn_project\n'> <'\t'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'add multiple props'>)} 
      {
        (SQ <'\n'> <'\tset_props "." "foo" \\\n'> 
          <'\t\t"svn:keywords" "FreeBSD=%H" fbsd:nokeywords yes &&\n'> <'\tgit svn dcommit &&\n'> <'\tsvn_cmd co "$svnrepo" svn_project &&\n'> 
          <'\tconfirm_props "." "foo" \\\n'> <'\t\t"svn:keywords" "FreeBSD=%H" fbsd:nokeywords yes &&\n'> <'\trm -rf svn_project\n'> <'\t'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'add props subdir'>)} 
      {
        (SQ <'\n'> <'\tset_props "." "$foo_subdir2" svn:keywords "FreeBSD=%H" &&\n'> 
          <'\tgit svn dcommit &&\n'> <'\tsvn_cmd co "$svnrepo" svn_project &&\n'> 
          <'\tconfirm_props "." "$foo_subdir2" "svn:keywords" "FreeBSD=%H" &&\n'> <'\trm -rf svn_project\n'> <'\t'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'add props relative'>)} 
      {
        (SQ <'\n'> <'\tset_props "subdir/subdir2" "../foo_subdir" \\\n'> 
          <'\t\tsvn:keywords "FreeBSD=%H" &&\n'> <'\tgit svn dcommit &&\n'> <'\tsvn_cmd co "$svnrepo" svn_project &&\n'> 
          <'\tconfirm_props "subdir/subdir2" "../foo_subdir" \\\n'> <'\t\tsvn:keywords "FreeBSD=%H" &&\n'> <'\trm -rf svn_project\n'> <'\t'>
        )
      }
    )
    (C {<test_done>})
  ]
)