(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          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: [16]
        )
      ]
      spids: [16]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: marked_as
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:foundEntry)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(grep)} {(DQ ('^/') ($ VSub_Number '$2') (/))} 
                                  {(DQ ($ VSub_Number '$1') (/CVS/Entries))}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [40 53]
                        )
                      )
                    }
                  spids: [38]
                )
              ]
              spids: [38]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_Name '$foundEntry'))} {(Lit_Other '=')} 
                          {(x) (DQ )} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('NOT FOUND: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' 1 ') 
                            ($ VSub_Number '$3')
                          )
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_DGreat
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                          spids: [90]
                        )
                      ]
                    )
                    (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                  ]
                  spids: [16777215 76]
                )
              ]
              spids: [16777215 105]
            )
            (C {(test)} 
              {(x) 
                (DQ 
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [
                          (Pipeline
                            children: [
                              (C {(grep)} {(DQ ('^/') ($ VSub_Number '$2') (/))} 
                                {(DQ ($ VSub_Number '$1') (/CVS/Entries))}
                              )
                              (C {(cut)} {(-d/)} {(-f5)})
                            ]
                            negated: False
                          )
                        ]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [112 133]
                  )
                )
              } {(Lit_Other '=')} {(x) (DQ ($ VSub_Number '$3'))}
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:stat)
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [144]
                )
              ]
              spids: [144]
            )
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' ') ($ VSub_Name '$stat') (" '") 
                    ($ VSub_Number '$3') ("'")
                  )
                }
              ]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                  spids: [161]
                )
              ]
            )
            (ControlFlow
              token: <ControlFlow_Return return>
              arg_word: {($ VSub_Name '$stat')}
            )
          ]
          spids: [35]
        )
      spids: [30 34]
    )
    (FuncDef
      name: not_present
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:foundEntry)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(grep)} {(DQ ('^/') ($ VSub_Number '$2') (/))} 
                                  {(DQ ($ VSub_Number '$1') (/CVS/Entries))}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [187 200]
                        )
                      )
                    }
                  spids: [185]
                )
              ]
              spids: [185]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(-r)} {(DQ ($ VSub_Number '$1') (/) ($ VSub_Number '$2'))} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('Error: File still exists: ') ($ VSub_Number '$1') (' ') 
                            ($ VSub_Number '$2')
                          )
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_DGreat
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                          spids: [232]
                        )
                      ]
                    )
                    (Sentence
                      child: (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [16777215 220]
                )
              ]
              spids: [16777215 248]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_Name '$foundEntry'))} 
                          {(KW_Bang '!') (Lit_Other '=')} {(x) (DQ )} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('Error: should not have found: ') ($ VSub_Number '$1') (' ') 
                            ($ VSub_Number '$2')
                          )
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_DGreat
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                          spids: [283]
                        )
                      ]
                    )
                    (Sentence
                      child: (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [16777215 271]
                )
              ]
              else_action: [
                (SimpleCommand
                  words: [
                    {(echo)}
                    {(DQ ('Correctly not found: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2'))}
                  ]
                  redirects: [
                    (Redir
                      op_id: Redir_DGreat
                      fd: 16777215
                      arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                      spids: [311]
                    )
                  ]
                )
                (Sentence
                  child: (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})
                  terminator: <Op_Semi ';'>
                )
              ]
              spids: [299 327]
            )
          ]
          spids: [182]
        )
      spids: [178 181]
    )
    (FuncDef
      name: check_status_options
      body: 
        (BraceGroup
          children: [
            (Subshell
              child: 
                (AndOr
                  children: [
                    (C {(cd)} {(DQ ($ VSub_Number '$1'))})
                    (SimpleCommand
                      words: [{(cvs)} {(-Q)} {(status)} {(DQ ($ VSub_Number '$2'))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/status.out))}
                          spids: [364]
                        )
                        (Redir
                          op_id: Redir_GreatAnd
                          fd: 2
                          arg_word: {(1)}
                          spids: [373]
                        )
                      ]
                      more_env: [
                        (env_pair
                          name: GIT_CONFIG
                          val: {(DQ ($ VSub_Name '$git_config'))}
                          spids: [349]
                        )
                      ]
                    )
                  ]
                  op_id: Op_DAmp
                )
              spids: [339 377]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_QMark '$?'))} 
                          {(KW_Bang '!') (Lit_Other '=')} {(x) (DQ (0))} {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('Error from cvs status: ') ($ VSub_Number '$1') (' ') 
                            ($ VSub_Number '$2')
                          )
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_DGreat
                          fd: 16777215
                          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                          spids: [413]
                        )
                      ]
                    )
                    (Sentence
                      child: (ControlFlow token:<ControlFlow_Return return> arg_word:{(1)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  spids: [16777215 401]
                )
              ]
              spids: [16777215 429]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:got)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(sed)} {(-n)} {(-e)} {(SQ <'s/^[ \t]*Sticky Options:[ \t]*//p'>)} 
                                  {(DQ (${ VSub_Name WORKDIR) (/status.out))}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [434 451]
                        )
                      )
                    }
                  spids: [432]
                )
              ]
              spids: [432]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:expect)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$3'))}
                  spids: [455]
                )
              ]
              spids: [455]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other '[')} {(x) (DQ ($ VSub_Name '$expect'))} {(Lit_Other '=')} {(x) (DQ )} 
                          {(Lit_Other ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:expect)
                          op: Equal
                          rhs: {(DQ ('(none)'))}
                          spids: [483]
                        )
                      ]
                      spids: [483]
                    )
                  ]
                  spids: [16777215 480]
                )
              ]
              spids: [16777215 489]
            )
            (C {(test)} {(x) (DQ ($ VSub_Name '$got'))} {(Lit_Other '=')} 
              {(x) (DQ ($ VSub_Name '$expect'))}
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:stat)
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [507]
                )
              ]
              spids: [507]
            )
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ('cvs status: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' ') 
                    ($ VSub_Name '$stat') (" '") ($ VSub_Number '$3') ("' '") ($ VSub_Name '$got') ("'")
                  )
                }
              ]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
                  spids: [527]
                )
              ]
            )
            (ControlFlow
              token: <ControlFlow_Return return>
              arg_word: {($ VSub_Name '$stat')}
            )
          ]
          spids: [336]
        )
      spids: [332 335]
    )
    (SimpleCommand
      words: [{(cvs)}]
      redirects: [
        (Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[546])
        (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[549])
      ]
    )
    (If
      arms: [
        (if_arm
          cond: [(C {(test)} {($ VSub_QMark '$?')} {(-ne)} {(1)})]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:skip_all)
                  op: Equal
                  rhs: {(SQ <'skipping git-cvsserver tests, cvs not found'>)}
                  spids: [565]
                )
              ]
              spids: [565]
            )
            (C {(test_done)})
          ]
          spids: [16777215 562]
        )
      ]
      spids: [16777215 573]
    )
    (If
      arms: [
        (if_arm
          cond: [(Pipeline children:[(C {(test_have_prereq)} {(PERL)})] negated:True)]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:skip_all)
                  op: Equal
                  rhs: {(SQ <'skipping git-cvsserver tests, perl not available'>)}
                  spids: [586]
                )
              ]
              spids: [586]
            )
            (C {(test_done)})
          ]
          spids: [16777215 583]
        )
      ]
      spids: [16777215 594]
    )
    (AndOr
      children: [
        (SimpleCommand
          words: [{(perl)} {(-e)} {(SQ <'use DBI; use DBD::SQLite'>)}]
          redirects: [
            (Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[604])
            (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[607])
          ]
        )
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:skip_all)
                  op: Equal
                  rhs: {(SQ <'skipping git-cvsserver tests, Perl SQLite interface unavailable'>)}
                  spids: [615]
                )
              ]
              spids: [615]
            )
            (C {(test_done)})
          ]
          spids: [612]
        )
      ]
      op_id: Op_DPipe
    )
    (C {(unset)} {(GIT_DIR)} {(GIT_CONFIG)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:WORKDIR)
          op: Equal
          rhs: {($ VSub_Name '$PWD')}
          spids: [632]
        )
      ]
      spids: [632]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:SERVERDIR)
          op: Equal
          rhs: {($ VSub_Name '$PWD') (/gitcvs.git)}
          spids: [635]
        )
      ]
      spids: [635]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:git_config)
          op: Equal
          rhs: {(DQ ($ VSub_Name '$SERVERDIR') (/config))}
          spids: [639]
        )
      ]
      spids: [639]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:CVSROOT)
          op: Equal
          rhs: {(DQ (':fork:') ($ VSub_Name '$SERVERDIR'))}
          spids: [645]
        )
      ]
      spids: [645]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:CVSWORK)
          op: Equal
          rhs: {(DQ ($ VSub_Name '$PWD') (/cvswork))}
          spids: [651]
        )
      ]
      spids: [651]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:CVS_SERVER) op:Equal rhs:{(git-cvsserver)} spids:[657])]
      spids: [657]
    )
    (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'>
        )
      }
    )
    (SimpleCommand
      words: [{(echo)} {(DQ ('starting update/merge'))}]
      redirects: [
        (Redir
          op_id: Redir_DGreat
          fd: 16777215
          arg_word: {(DQ (${ VSub_Name WORKDIR) (/marked.log))}
          spids: [1118]
        )
      ]
    )
    (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)})
  ]
)