(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description spids:[12])
          op: Equal
          rhs: {(SQ <'log --grep/--author/--regexp-ignore-case/-S/-G'>)}
          spids: [12]
        )
      ]
      spids: [12]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.FuncDef
      name: test_log
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:expect spids:[30])
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [30]
                )
              ]
              spids: [30]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:kind spids:[34])
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [34]
                )
              ]
              spids: [34]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:needle spids:[38])
                  op: Equal
                  rhs: {($ VSub_Number '$3')}
                  spids: [38]
                )
              ]
              spids: [38]
            )
            (C {(shift)} {(3)})
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:rest spids:[47])
                  op: Equal
                  rhs: {($ VSub_At '$@')}
                  spids: [47]
                )
              ]
              spids: [47]
            )
            (command.Case
              to_match: {($ VSub_Name '$kind')}
              arms: [
                (case_arm
                  pat_list: [{(--) (Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:opt spids:[64])
                          op: Equal
                          rhs: {($ VSub_Name '$kind') (Lit_Other '=') ($ VSub_Name '$needle')}
                          spids: [64]
                        )
                      ]
                      spids: [64]
                    )
                  ]
                  spids: [59 61 70 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:opt spids:[77])
                          op: Equal
                          rhs: {($ VSub_Name '$kind') ($ VSub_Name '$needle')}
                          spids: [77]
                        )
                      ]
                      spids: [77]
                    )
                  ]
                  spids: [73 74 82 16777215]
                )
              ]
              spids: [52 56 85]
            )
            (command.Case
              to_match: {($ VSub_Name '$expect')}
              arms: [
                (case_arm
                  pat_list: [{(expect_nomatch)}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:match spids:[99])
                          op: Equal
                          rhs: {(nomatch)}
                          spids: [99]
                        )
                      ]
                      spids: [99]
                    )
                  ]
                  spids: [95 96 103 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:match spids:[110])
                          op: Equal
                          rhs: {(match)}
                          spids: [110]
                        )
                      ]
                      spids: [110]
                    )
                  ]
                  spids: [106 107 114 16777215]
                )
              ]
              spids: [88 92 117]
            )
            (C {(test_expect_success)} 
              {
                (DQ ('log ') ($ VSub_Name '$kind') 
                  (word_part.BracedVarSub
                    token: <VSub_Name rest>
                    suffix_op: 
                      (suffix_op.StringUnary
                        op_id: VTest_ColonPlus
                        arg_word: {(' ') ($ VSub_Name '$rest')}
                      )
                    spids: [126 131]
                  ) (' (') ($ VSub_Name '$match') (')')
                )
              } 
              {
                (DQ ('\n') ('\t\tgit log ') ($ VSub_Name '$rest') (' ') ($ VSub_Name '$opt') 
                  (' --format=%H >actual &&\n') ('\t\ttest_cmp ') ($ VSub_Name '$expect') (' actual\n') ('\t')
                )
              }
            )
          ]
          spids: [27]
        )
      spids: [22 26]
    )
    (command.FuncDef
      name: test_log_icase
      body: 
        (command.BraceGroup
          children: [
            (C {(test_log)} {($ VSub_At '$@')} {(--regexp-ignore-case)})
            (C {(test_log)} {($ VSub_At '$@')} {(-i)})
          ]
          spids: [161]
        )
      spids: [156 160]
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ <'\n'> <'\t>expect_nomatch &&\n'> <'\n'> <'\t>file &&\n'> <'\tgit add file &&\n'> 
          <'\ttest_tick &&\n'> <'\tgit commit -m initial &&\n'> <'\tgit rev-parse --verify HEAD >expect_initial &&\n'> <'\n'> 
          <'\techo Picked >file &&\n'> <'\tgit add file &&\n'> <'\ttest_tick &&\n'> 
          <'\tgit commit --author="Another Person <another@example.com>" -m second &&\n'> <'\tgit rev-parse --verify HEAD >expect_second\n'>
        )
      }
    )
    (C {(test_log)} {(expect_initial)} {(--grep)} {(initial)})
    (C {(test_log)} {(expect_nomatch)} {(--grep)} {(InItial)})
    (C {(test_log_icase)} {(expect_initial)} {(--grep)} {(InItial)})
    (C {(test_log_icase)} {(expect_nomatch)} {(--grep)} {(initail)})
    (C {(test_log)} {(expect_second)} {(--author)} {(Person)})
    (C {(test_log)} {(expect_nomatch)} {(--author)} {(person)})
    (C {(test_log_icase)} {(expect_second)} {(--author)} {(person)})
    (C {(test_log_icase)} {(expect_nomatch)} {(--author)} {(spreon)})
    (C {(test_log)} {(expect_nomatch)} {(-G)} {(picked)})
    (C {(test_log)} {(expect_second)} {(-G)} {(Picked)})
    (C {(test_log_icase)} {(expect_nomatch)} {(-G)} {(pickle)})
    (C {(test_log_icase)} {(expect_second)} {(-G)} {(picked)})
    (C {(test_expect_success)} {(SQ <'log -G --textconv (missing textconv tool)'>)} 
      {
        (SQ <'\n'> <'\techo "* diff=test" >.gitattributes &&\n'> 
          <'\ttest_must_fail git -c diff.test.textconv=missing log -Gfoo &&\n'> <'\trm .gitattributes\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'log -G --no-textconv (missing textconv tool)'>)} 
      {
        (SQ <'\n'> <'\techo "* diff=test" >.gitattributes &&\n'> 
          <'\tgit -c diff.test.textconv=missing log -Gfoo --no-textconv >actual &&\n'> <'\ttest_cmp expect_nomatch actual &&\n'> <'\trm .gitattributes\n'>
        )
      }
    )
    (C {(test_log)} {(expect_nomatch)} {(-S)} {(picked)})
    (C {(test_log)} {(expect_second)} {(-S)} {(Picked)})
    (C {(test_log_icase)} {(expect_second)} {(-S)} {(picked)})
    (C {(test_log_icase)} {(expect_nomatch)} {(-S)} {(pickle)})
    (C {(test_log)} {(expect_nomatch)} {(-S)} {(p.cked)} {(--pickaxe-regex)})
    (C {(test_log)} {(expect_second)} {(-S)} {(P.cked)} {(--pickaxe-regex)})
    (C {(test_log_icase)} {(expect_second)} {(-S)} {(p.cked)} {(--pickaxe-regex)})
    (C {(test_log_icase)} {(expect_nomatch)} {(-S)} {(p.ckle)} {(--pickaxe-regex)})
    (C {(test_expect_success)} {(SQ <'log -S --textconv (missing textconv tool)'>)} 
      {
        (SQ <'\n'> <'\techo "* diff=test" >.gitattributes &&\n'> 
          <'\ttest_must_fail git -c diff.test.textconv=missing log -Sfoo &&\n'> <'\trm .gitattributes\n'>
        )
      }
    )
    (C {(test_expect_success)} {(SQ <'log -S --no-textconv (missing textconv tool)'>)} 
      {
        (SQ <'\n'> <'\techo "* diff=test" >.gitattributes &&\n'> 
          <'\tgit -c diff.test.textconv=missing log -Sfoo --no-textconv >actual &&\n'> <'\ttest_cmp expect_nomatch actual &&\n'> <'\trm .gitattributes\n'>
        )
      }
    )
    (C {(test_done)})
  ]
)