(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[24])
          op: Equal
          rhs: 
            {
              (SQ <'git-cvsserver -kb modes\n'> <'\n'> 
                <'tests -kb mode for binary files when accessing a git\n'> <'repository using cvs CLI client via git-cvsserver server'>
              )
            }
          spids: [24]
        )
      ]
      spids: [24]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: marked_as
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:foundEntry spids:[46])
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSubPart
                          command_list: 
                            (command.CommandList
                              children: [
                                (C {(grep)} {(DQ ('^/') ($ VSub_Number '$2') (/))} 
                                  {(DQ ($ VSub_Number '$1') (/CVS/Entries))}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [48 61]
                        )
                      )
                    }
                  spids: [46]
                )
              ]
              spids: [46]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_Name '$foundEntry'))} {(Lit_Other '=')} 
                          {(x) (DQ )} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('NOT FOUND: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' 1 ') 
                            ($ VSub_Number '$3')
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                  spids: [16777215 84]
                )
              ]
              spids: [16777215 113]
            )
            (C {(test)} 
              {(x) 
                (DQ 
                  (word_part.CommandSubPart
                    command_list: 
                      (command.CommandList
                        children: [
                          (command.Pipeline
                            children: [
                              (C {(grep)} {(DQ ('^/') ($ VSub_Number '$2') (/))} 
                                {(DQ ($ VSub_Number '$1') (/CVS/Entries))}
                              )
                              (C {(cut)} {(-d/)} {(-f5)})
                            ]
                            negated: F
                          )
                        ]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [120 141]
                  )
                )
              } {(Lit_Other '=')} {(x) (DQ ($ VSub_Number '$3'))}
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:stat spids:[152])
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [152]
                )
              ]
              spids: [152]
            )
            (command.SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' ') ($ VSub_Name '$stat') (" '") 
                    ($ VSub_Number '$3') ("'")
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: <Redir_DGreat '>>'>
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                )
              ]
            )
            (command.ControlFlow
              token: <ControlFlow_Return return>
              arg_word: {($ VSub_Name '$stat')}
            )
          ]
          spids: [43]
        )
      spids: [38 42]
    )
    (command.FuncDef
      name: not_present
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:foundEntry spids:[193])
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSubPart
                          command_list: 
                            (command.CommandList
                              children: [
                                (C {(grep)} {(DQ ('^/') ($ VSub_Number '$2') (/))} 
                                  {(DQ ($ VSub_Number '$1') (/CVS/Entries))}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [195 208]
                        )
                      )
                    }
                  spids: [193]
                )
              ]
              spids: [193]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-r)} {(DQ ($ VSub_Number '$1') (/) ($ VSub_Number '$2'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('Error: File still exists: ') ($ VSub_Number '$1') (' ') 
                            ($ VSub_Number '$2')
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                        )
                      ]
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [16777215 228]
                )
              ]
              spids: [16777215 256]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_Name '$foundEntry'))} 
                          {(KW_Bang '!') (Lit_Other '=')} {(x) (DQ )} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('Error: should not have found: ') ($ VSub_Number '$1') (' ') 
                            ($ VSub_Number '$2')
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                        )
                      ]
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [16777215 279]
                )
              ]
              else_action: [
                (command.SimpleCommand
                  words: [
                    {(echo)}
                    {(DQ ('Correctly not found: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2'))}
                  ]
                  redirects: [
                    (redir.Redir
                      op: <Redir_DGreat '>>'>
                      fd: 16777215
                      arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                    )
                  ]
                )
                (command.Sentence
                  child: (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  terminator: <Op_Semi ';'>
                )
              ]
              spids: [307 335]
            )
          ]
          spids: [190]
        )
      spids: [186 189]
    )
    (command.FuncDef
      name: check_status_options
      body: 
        (command.BraceGroup
          children: [
            (command.Subshell
              child: 
                (command.AndOr
                  ops: [Op_DAmp]
                  children: [
                    (C {(cd)} {(DQ ($ VSub_Number '$1'))})
                    (command.SimpleCommand
                      words: [{(cvs)} {(-Q)} {(status)} {(DQ ($ VSub_Number '$2'))}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/status.out))}
                        )
                        (redir.Redir
                          op: <Redir_GreatAnd '2>&'>
                          fd: 2
                          arg_word: {(1)}
                        )
                      ]
                      more_env: [
                        (env_pair
                          name: GIT_CONFIG
                          val: {(DQ ($ VSub_Name '$git_config'))}
                          spids: [357]
                        )
                      ]
                    )
                  ]
                )
              spids: [347 385]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_QMark '$?'))} 
                          {(KW_Bang '!') (Lit_Other '=')} {(x) (DQ (0))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('Error from cvs status: ') ($ VSub_Number '$1') (' ') 
                            ($ VSub_Number '$2')
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                        )
                      ]
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [16777215 409]
                )
              ]
              spids: [16777215 437]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:got spids:[440])
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSubPart
                          command_list: 
                            (command.CommandList
                              children: [
                                (C {(sed)} {(-n)} {(-e)} {(SQ <'s/^[ \t]*Sticky Options:[ \t]*//p'>)} 
                                  {(DQ (${ VSub_Name WORKDIR) (/status.out))}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [442 459]
                        )
                      )
                    }
                  spids: [440]
                )
              ]
              spids: [440]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:expect spids:[463])
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$3'))}
                  spids: [463]
                )
              ]
              spids: [463]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_Name '$expect'))} {(Lit_Other '=')} {(x) (DQ )} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:expect spids:[491])
                          op: Equal
                          rhs: {(DQ ('(none)'))}
                          spids: [491]
                        )
                      ]
                      spids: [491]
                    )
                  ]
                  spids: [16777215 488]
                )
              ]
              spids: [16777215 497]
            )
            (C {(test)} {(x) (DQ ($ VSub_Name '$got'))} {(Lit_Other '=')} 
              {(x) (DQ ($ VSub_Name '$expect'))}
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:stat spids:[515])
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [515]
                )
              ]
              spids: [515]
            )
            (command.SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ('cvs status: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' ') 
                    ($ VSub_Name '$stat') (" '") ($ VSub_Number '$3') ("' '") ($ VSub_Name '$got') ("'")
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: <Redir_DGreat '>>'>
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                )
              ]
            )
            (command.ControlFlow
              token: <ControlFlow_Return return>
              arg_word: {($ VSub_Name '$stat')}
            )
          ]
          spids: [344]
        )
      spids: [340 343]
    )
    (command.SimpleCommand
      words: [{(cvs)}]
      redirects: [
        (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})
        (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {($ VSub_QMark '$?')} {(-ne)} {(1)})]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:skip_all spids:[573])
                  op: Equal
                  rhs: {(SQ <'skipping git-cvsserver tests, cvs not found'>)}
                  spids: [573]
                )
              ]
              spids: [573]
            )
            (C {(test_done)})
          ]
          spids: [16777215 570]
        )
      ]
      spids: [16777215 581]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(command.Pipeline children:[(C {(test_have_prereq)} {(PERL)})] negated:T)]
          action: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:skip_all spids:[594])
                  op: Equal
                  rhs: {(SQ <'skipping git-cvsserver tests, perl not available'>)}
                  spids: [594]
                )
              ]
              spids: [594]
            )
            (C {(test_done)})
          ]
          spids: [16777215 591]
        )
      ]
      spids: [16777215 602]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.SimpleCommand
          words: [{(perl)} {(-e)} {(SQ <'use DBI; use DBD::SQLite'>)}]
          redirects: [
            (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})
            (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})
          ]
        )
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:skip_all spids:[623])
                  op: Equal
                  rhs: {(SQ <'skipping git-cvsserver tests, Perl SQLite interface unavailable'>)}
                  spids: [623]
                )
              ]
              spids: [623]
            )
            (C {(test_done)})
          ]
          spids: [620]
        )
      ]
    )
    (C {(unset)} {(GIT_DIR)} {(GIT_CONFIG)})
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:WORKDIR spids:[640])
          op: Equal
          rhs: {($ VSub_Name '$PWD')}
          spids: [640]
        )
      ]
      spids: [640]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:SERVERDIR spids:[643])
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/gitcvs.git)}
          spids: [643]
        )
      ]
      spids: [643]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:git_config spids:[647])
          op: Equal
          rhs: {(DQ ($ VSub_Name '$SERVERDIR') (/config))}
          spids: [647]
        )
      ]
      spids: [647]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:CVSROOT spids:[653])
          op: Equal
          rhs: {(DQ (':fork:') ($ VSub_Name '$SERVERDIR'))}
          spids: [653]
        )
      ]
      spids: [653]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:CVSWORK spids:[659])
          op: Equal
          rhs: {(DQ ($ VSub_Name '$PWD') (/cvswork))}
          spids: [659]
        )
      ]
      spids: [659]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:CVS_SERVER spids:[665])
          op: Equal
          rhs: {(git-cvsserver)}
          spids: [665]
        )
      ]
      spids: [665]
    )
    (C {(export)} {(CVSROOT)} {(CVS_SERVER)})
    (C {(rm)} {(-rf)} {(DQ ($ VSub_Name '$CVSWORK'))} {(DQ ($ VSub_Name '$SERVERDIR'))})
    (C {(test_expect_success)} {(SQ <setup>)} 
      {
        (SQ <'\n'> <'    git config push.default matching &&\n'> 
          <'    echo "Simple text file" >textfile.c &&\n'> <'    echo "File with embedded NUL: Q <- there" | q_to_nul > binfile.bin &&\n'> 
          <'    mkdir subdir &&\n'> <'    echo "Another text file" > subdir/file.h &&\n'> 
          <'    echo "Another binary: Q (this time CR)" | q_to_cr > subdir/withCr.bin &&\n'> <'    echo "Mixed up NUL, but marked text: Q <- there" | q_to_nul > mixedUp.c &&\n'> 
          <'    echo "Unspecified" > subdir/unspecified.other &&\n'> <'    echo "/*.bin -crlf" > .gitattributes &&\n'> <'    echo "/*.c crlf" >> .gitattributes &&\n'> 
          <'    echo "subdir/*.bin -crlf" >> .gitattributes &&\n'> <'    echo "subdir/*.c crlf" >> .gitattributes &&\n'> 
          <'    echo "subdir/file.h crlf" >> .gitattributes &&\n'> <'    git add .gitattributes textfile.c binfile.bin mixedUp.c subdir/* &&\n'> 
          <'    git commit -q -m "First Commit" &&\n'> <'    git clone -q --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 &&\n'> 
          <'    GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true &&\n'> <'    GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log"\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'cvs co (default crlf)'>)} 
      {
        (SQ <'\n'> <'    GIT_CONFIG="$git_config" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n'> 
          <'    test x"$(grep '>
        ) (/-k) (SQ <' cvswork/CVS/Entries cvswork/subdir/CVS/Entries)" = x""\n'>)
      }
    )
    (C {(rm)} {(-rf)} {(cvswork)})
    (C {(test_expect_success)} {(SQ <'cvs co (allbinary)'>)} 
      {
        (SQ <'\n'> <'    GIT_DIR="$SERVERDIR" git config --bool gitcvs.allbinary true &&\n'> 
          <'    GIT_CONFIG="$git_config" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n'> <'    marked_as cvswork textfile.c -kb &&\n'> <'    marked_as cvswork binfile.bin -kb &&\n'> 
          <'    marked_as cvswork .gitattributes -kb &&\n'> <'    marked_as cvswork mixedUp.c -kb &&\n'> <'    marked_as cvswork/subdir withCr.bin -kb &&\n'> 
          <'    marked_as cvswork/subdir file.h -kb &&\n'> <'    marked_as cvswork/subdir unspecified.other -kb\n'>
        )
      }
    )
    (C {(rm)} {(-rf)} {(cvswork)} {(cvs.log)})
    (C {(test_expect_success)} {(SQ <'cvs co (use attributes/allbinary)'>)} 
      {
        (SQ <'\n'> <'    GIT_DIR="$SERVERDIR" git config --bool gitcvs.usecrlfattr true &&\n'> 
          <'    GIT_CONFIG="$git_config" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n'> <'    marked_as cvswork textfile.c "" &&\n'> <'    marked_as cvswork binfile.bin -kb &&\n'> 
          <'    marked_as cvswork .gitattributes -kb &&\n'> <'    marked_as cvswork mixedUp.c "" &&\n'> <'    marked_as cvswork/subdir withCr.bin -kb &&\n'> 
          <'    marked_as cvswork/subdir file.h "" &&\n'> <'    marked_as cvswork/subdir unspecified.other -kb\n'>
        )
      }
    )
    (C {(rm)} {(-rf)} {(cvswork)})
    (C {(test_expect_success)} {(SQ <'cvs co (use attributes)'>)} 
      {
        (SQ <'\n'> <'    GIT_DIR="$SERVERDIR" git config --bool gitcvs.allbinary false &&\n'> 
          <'    GIT_CONFIG="$git_config" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n'> <'    marked_as cvswork textfile.c "" &&\n'> <'    marked_as cvswork binfile.bin -kb &&\n'> 
          <'    marked_as cvswork .gitattributes "" &&\n'> <'    marked_as cvswork mixedUp.c "" &&\n'> <'    marked_as cvswork/subdir withCr.bin -kb &&\n'> 
          <'    marked_as cvswork/subdir file.h "" &&\n'> <'    marked_as cvswork/subdir unspecified.other ""\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'adding files'>)} 
      {
        (SQ <'\n'> <'    (cd cvswork &&\n'> <'    (cd subdir &&\n'> 
          <'    echo "more text" > src.c &&\n'> <'    GIT_CONFIG="$git_config" cvs -Q add src.c >cvs.log 2>&1 &&\n'> <'    marked_as . src.c "" &&\n'> 
          <'    echo "pseudo-binary" > temp.bin\n'> <'    ) &&\n'> <'    GIT_CONFIG="$git_config" cvs -Q add subdir/temp.bin >cvs.log 2>&1 &&\n'> 
          <'    marked_as subdir temp.bin "-kb" &&\n'> <'    cd subdir &&\n'> <'    GIT_CONFIG="$git_config" cvs -Q ci -m "adding files" >cvs.log 2>&1 &&\n'> 
          <'    marked_as . temp.bin "-kb" &&\n'> <'    marked_as . src.c ""\n'> <'    )\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <updating>)} 
      {(SQ <'\n'> <'    git pull gitcvs.git &&\n'> <'    echo '>) (hi) 
        (SQ <' > subdir/newfile.bin &&\n'> <'    echo '>) (junk) (SQ <' > subdir/file.h &&\n'> <'    echo '>) (hi) (SQ <' > subdir/newfile.c &&\n'> <'    echo '>) 
        (hello) 
        (SQ <' >> binfile.bin &&\n'> 
          <'    git add subdir/newfile.bin subdir/file.h subdir/newfile.c binfile.bin &&\n'> <'    git commit -q -m "Add and change some files" &&\n'> <'    git push gitcvs.git >/dev/null &&\n'> 
          <'    (cd cvswork &&\n'> <'    GIT_CONFIG="$git_config" cvs -Q update\n'> <'    ) &&\n'> 
          <'    marked_as cvswork textfile.c "" &&\n'> <'    marked_as cvswork binfile.bin -kb &&\n'> <'    marked_as cvswork .gitattributes "" &&\n'> 
          <'    marked_as cvswork mixedUp.c "" &&\n'> <'    marked_as cvswork/subdir withCr.bin -kb &&\n'> <'    marked_as cvswork/subdir file.h "" &&\n'> 
          <'    marked_as cvswork/subdir unspecified.other "" &&\n'> <'    marked_as cvswork/subdir newfile.bin -kb &&\n'> 
          <'    marked_as cvswork/subdir newfile.c "" &&\n'> <'    echo "File with embedded NUL: Q <- there" | q_to_nul > tmpExpect1 &&\n'> 
          <'    echo "hello" >> tmpExpect1 &&\n'> <'    cmp cvswork/binfile.bin tmpExpect1\n'>
        )
      }
    )
    (C {(rm)} {(-rf)} {(cvswork)})
    (C {(test_expect_success)} {(SQ <'cvs co (use attributes/guess)'>)} 
      {
        (SQ <'\n'> <'    GIT_DIR="$SERVERDIR" git config gitcvs.allbinary guess &&\n'> 
          <'    GIT_CONFIG="$git_config" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n'> <'    marked_as cvswork textfile.c "" &&\n'> <'    marked_as cvswork binfile.bin -kb &&\n'> 
          <'    marked_as cvswork .gitattributes "" &&\n'> <'    marked_as cvswork mixedUp.c "" &&\n'> <'    marked_as cvswork/subdir withCr.bin -kb &&\n'> 
          <'    marked_as cvswork/subdir file.h "" &&\n'> <'    marked_as cvswork/subdir unspecified.other "" &&\n'> 
          <'    marked_as cvswork/subdir newfile.bin -kb &&\n'> <'    marked_as cvswork/subdir newfile.c ""\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'setup multi-line files'>)} 
      {
        (SQ <'\n'> <'    ( echo "line 1" &&\n'> <'      echo "line 2" &&\n'> 
          <'      echo "line 3" &&\n'> <'      echo "line 4 with NUL: Q <-" ) | q_to_nul > multiline.c &&\n'> 
          <'    git add multiline.c &&\n'> <'    ( echo "line 1" &&\n'> <'      echo "line 2" &&\n'> <'      echo "line 3" &&\n'> 
          <'      echo "line 4" ) | q_to_nul > multilineTxt.c &&\n'> <'    git add multilineTxt.c &&\n'> <'    git commit -q -m "multiline files" &&\n'> 
          <'    git push gitcvs.git >/dev/null\n'>
        )
      }
    )
    (C {(rm)} {(-rf)} {(cvswork)})
    (C {(test_expect_success)} {(SQ <'cvs co (guess)'>)} 
      {
        (SQ <'\n'> <'    GIT_DIR="$SERVERDIR" git config --bool gitcvs.usecrlfattr false &&\n'> 
          <'    GIT_CONFIG="$git_config" cvs -Q co -d cvswork master >cvs.log 2>&1 &&\n'> <'    marked_as cvswork textfile.c "" &&\n'> <'    marked_as cvswork binfile.bin -kb &&\n'> 
          <'    marked_as cvswork .gitattributes "" &&\n'> <'    marked_as cvswork mixedUp.c -kb &&\n'> <'    marked_as cvswork multiline.c -kb &&\n'> 
          <'    marked_as cvswork multilineTxt.c "" &&\n'> <'    marked_as cvswork/subdir withCr.bin -kb &&\n'> <'    marked_as cvswork/subdir file.h "" &&\n'> 
          <'    marked_as cvswork/subdir unspecified.other "" &&\n'> <'    marked_as cvswork/subdir newfile.bin "" &&\n'> <'    marked_as cvswork/subdir newfile.c ""\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'cvs co another copy (guess)'>)} 
      {
        (SQ <'\n'> <'    GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&\n'> 
          <'    marked_as cvswork2 textfile.c "" &&\n'> <'    marked_as cvswork2 binfile.bin -kb &&\n'> <'    marked_as cvswork2 .gitattributes "" &&\n'> 
          <'    marked_as cvswork2 mixedUp.c -kb &&\n'> <'    marked_as cvswork2 multiline.c -kb &&\n'> <'    marked_as cvswork2 multilineTxt.c "" &&\n'> 
          <'    marked_as cvswork2/subdir withCr.bin -kb &&\n'> <'    marked_as cvswork2/subdir file.h "" &&\n'> 
          <'    marked_as cvswork2/subdir unspecified.other "" &&\n'> <'    marked_as cvswork2/subdir newfile.bin "" &&\n'> <'    marked_as cvswork2/subdir newfile.c ""\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'cvs status - sticky options'>)} 
      {
        (SQ <'\n'> <'    check_status_options cvswork2 textfile.c "" &&\n'> 
          <'    check_status_options cvswork2 binfile.bin -kb &&\n'> <'    check_status_options cvswork2 .gitattributes "" &&\n'> 
          <'    check_status_options cvswork2 mixedUp.c -kb &&\n'> <'    check_status_options cvswork2 multiline.c -kb &&\n'> 
          <'    check_status_options cvswork2 multilineTxt.c "" &&\n'> <'    check_status_options cvswork2/subdir withCr.bin -kb &&\n'> 
          <'    check_status_options cvswork2 subdir/withCr.bin -kb &&\n'> <'    check_status_options cvswork2/subdir file.h "" &&\n'> 
          <'    check_status_options cvswork2 subdir/file.h "" &&\n'> <'    check_status_options cvswork2/subdir unspecified.other "" &&\n'> 
          <'    check_status_options cvswork2/subdir newfile.bin "" &&\n'> <'    check_status_options cvswork2/subdir newfile.c ""\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'add text (guess)'>)} 
      {
        (SQ <'\n'> <'    (cd cvswork &&\n'> <'    echo "simpleText" > simpleText.c &&\n'> 
          <'    GIT_CONFIG="$git_config" cvs -Q add simpleText.c\n'> <'    ) &&\n'> <'    marked_as cvswork simpleText.c ""\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'add bin (guess)'>)} 
      {
        (SQ <'\n'> <'    (cd cvswork &&\n'> 
          <'    echo "simpleBin: NUL: Q <- there" | q_to_nul > simpleBin.bin &&\n'> <'    GIT_CONFIG="$git_config" cvs -Q add simpleBin.bin\n'> <'    ) &&\n'> 
          <'    marked_as cvswork simpleBin.bin -kb\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'remove files (guess)'>)} 
      {
        (SQ <'\n'> <'    (cd cvswork &&\n'> 
          <'    GIT_CONFIG="$git_config" cvs -Q rm -f subdir/file.h &&\n'> <'    (cd subdir &&\n'> <'    GIT_CONFIG="$git_config" cvs -Q rm -f withCr.bin\n'> <'    )) &&\n'> 
          <'    marked_as cvswork/subdir withCr.bin -kb &&\n'> <'    marked_as cvswork/subdir file.h ""\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'cvs ci (guess)'>)} 
      {
        (SQ <'\n'> <'    (cd cvswork &&\n'> 
          <'    GIT_CONFIG="$git_config" cvs -Q ci -m "add/rm files" >cvs.log 2>&1\n'> <'    ) &&\n'> <'    marked_as cvswork textfile.c "" &&\n'> 
          <'    marked_as cvswork binfile.bin -kb &&\n'> <'    marked_as cvswork .gitattributes "" &&\n'> <'    marked_as cvswork mixedUp.c -kb &&\n'> 
          <'    marked_as cvswork multiline.c -kb &&\n'> <'    marked_as cvswork multilineTxt.c "" &&\n'> <'    not_present cvswork/subdir withCr.bin &&\n'> 
          <'    not_present cvswork/subdir file.h &&\n'> <'    marked_as cvswork/subdir unspecified.other "" &&\n'> 
          <'    marked_as cvswork/subdir newfile.bin "" &&\n'> <'    marked_as cvswork/subdir newfile.c "" &&\n'> <'    marked_as cvswork simpleBin.bin -kb &&\n'> 
          <'    marked_as cvswork simpleText.c ""\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'update subdir of other copy (guess)'>)} 
      {
        (SQ <'\n'> <'    (cd cvswork2/subdir &&\n'> <'    GIT_CONFIG="$git_config" cvs -Q update\n'> 
          <'    ) &&\n'> <'    marked_as cvswork2 textfile.c "" &&\n'> <'    marked_as cvswork2 binfile.bin -kb &&\n'> 
          <'    marked_as cvswork2 .gitattributes "" &&\n'> <'    marked_as cvswork2 mixedUp.c -kb &&\n'> <'    marked_as cvswork2 multiline.c -kb &&\n'> 
          <'    marked_as cvswork2 multilineTxt.c "" &&\n'> <'    not_present cvswork2/subdir withCr.bin &&\n'> <'    not_present cvswork2/subdir file.h &&\n'> 
          <'    marked_as cvswork2/subdir unspecified.other "" &&\n'> <'    marked_as cvswork2/subdir newfile.bin "" &&\n'> 
          <'    marked_as cvswork2/subdir newfile.c "" &&\n'> <'    not_present cvswork2 simpleBin.bin &&\n'> <'    not_present cvswork2 simpleText.c\n'>
        )
      }
    )
    (command.SimpleCommand
      words: [{(echo)} {(DQ ('starting update/merge'))}]
      redirects: [
        (redir.Redir
          op: <Redir_DGreat '>>'>
          fd: 16777215
          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
        )
      ]
    )
    (C {(test_expect_success)} {(SQ <'update/merge full other copy (guess)'>)} 
      {
        (SQ <'\n'> <'    git pull gitcvs.git master &&\n'> 
          <'    sed "s/3/replaced_3/" < multilineTxt.c > ml.temp &&\n'> <'    mv ml.temp multilineTxt.c &&\n'> <'    git add multilineTxt.c &&\n'> 
          <'    git commit -q -m "modify multiline file" >> "${WORKDIR}/marked.log" &&\n'> <'    git push gitcvs.git >/dev/null &&\n'> <'    (cd cvswork2 &&\n'> 
          <'    sed "s/1/replaced_1/" < multilineTxt.c > ml.temp &&\n'> <'    mv ml.temp multilineTxt.c &&\n'> <'    GIT_CONFIG="$git_config" cvs update > cvs.log 2>&1\n'> 
          <'    ) &&\n'> <'    marked_as cvswork2 textfile.c "" &&\n'> <'    marked_as cvswork2 binfile.bin -kb &&\n'> 
          <'    marked_as cvswork2 .gitattributes "" &&\n'> <'    marked_as cvswork2 mixedUp.c -kb &&\n'> <'    marked_as cvswork2 multiline.c -kb &&\n'> 
          <'    marked_as cvswork2 multilineTxt.c "" &&\n'> <'    not_present cvswork2/subdir withCr.bin &&\n'> <'    not_present cvswork2/subdir file.h &&\n'> 
          <'    marked_as cvswork2/subdir unspecified.other "" &&\n'> <'    marked_as cvswork2/subdir newfile.bin "" &&\n'> 
          <'    marked_as cvswork2/subdir newfile.c "" &&\n'> <'    marked_as cvswork2 simpleBin.bin -kb &&\n'> <'    marked_as cvswork2 simpleText.c "" &&\n'> 
          <'    echo "line replaced_1" > tmpExpect2 &&\n'> <'    echo "line 2" >> tmpExpect2 &&\n'> <'    echo "line replaced_3" >> tmpExpect2 &&\n'> 
          <'    echo "line 4" | q_to_nul >> tmpExpect2 &&\n'> <'    cmp cvswork2/multilineTxt.c tmpExpect2\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)