(List
  (= scope=<EAssignScope.GLOBAL 1> flags=0 words=[] bindings=[('test_description', {[SQ <LIT_CHARS "git grep various.\n">]})])
  (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS hello.c]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "#include <stdio.h>\n"][LIT_CHARS "int main(int argc, const char **argv)\n"][LIT_CHARS "{\n"][LIT_CHARS "\tprintf("][RIGHT_D_QUOTE "\""][LIT_CHARS "Hello world."][\ LIT_ESCAPED_CHAR "\\n"][RIGHT_D_QUOTE "\""][LIT_CHARS ");\n"][LIT_CHARS "\treturn 0;\n"][LIT_CHARS "\t/* char ?? */\n"][LIT_CHARS "}\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS setup]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo foo mmap bar\n"> <LIT_CHARS "\t\techo foo_mmap bar\n"> <LIT_CHARS "\t\techo foo_mmap bar mmap\n"> <LIT_CHARS "\t\techo foo mmap bar_mmap\n"> <LIT_CHARS "\t\techo foo_mmap bar mmap baz\n"> <LIT_CHARS "\t} >file &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo Hello world\n"> <LIT_CHARS "\t\techo HeLLo world\n"> <LIT_CHARS "\t\techo Hello_world\n"> <LIT_CHARS "\t\techo HeLLo_world\n"> <LIT_CHARS "\t} >hello_world &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo \"a+b*c\"\n"> <LIT_CHARS "\t\techo \"a+bc\"\n"> <LIT_CHARS "\t\techo \"abc\"\n"> <LIT_CHARS "\t} >ab &&\n"> <LIT_CHARS "\techo vvv >v &&\n"> <LIT_CHARS "\techo ww w >w &&\n"> <LIT_CHARS "\techo x x xx x >x &&\n"> <LIT_CHARS "\techo y yy >y &&\n"> <LIT_CHARS "\techo zzz > z &&\n"> <LIT_CHARS "\tmkdir t &&\n"> <LIT_CHARS "\techo test >t/t &&\n"> <LIT_CHARS "\techo vvv >t/v &&\n"> <LIT_CHARS "\tmkdir t/a &&\n"> <LIT_CHARS "\techo vvv >t/a/v &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo \"line without leading space1\"\n"> <LIT_CHARS "\t\techo \" line with leading space1\"\n"> <LIT_CHARS "\t\techo \" line with leading space2\"\n"> <LIT_CHARS "\t\techo \" line with leading space3\"\n"> <LIT_CHARS "\t\techo \"line without leading space2\"\n"> <LIT_CHARS "\t} >space &&\n"> <LIT_CHARS "\tgit add . &&\n"> <LIT_CHARS "\ttest_tick &&\n"> <LIT_CHARS "\tgit commit -m initial\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep should not segfault with a bad input">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git grep \"(\"\n">]}  )
  (For H [{[LIT_CHARS HEAD]}, {[SQ ]}])
    (List
      (Case to_match={[DQ [VarSub H]]}, pat_word_list=[[{[LIT_CHARS HEAD]}], [{[SQ ]}]]
        (= scope=<EAssignScope.GLOBAL 1> flags=0 words=[] bindings=[('HC', {[SQ <LIT_CHARS "HEAD:">]}), ('L', {[SQ <LIT_CHARS HEAD>]})])
        (= scope=<EAssignScope.GLOBAL 1> flags=0 words=[] bindings=[('HC', {[SQ ]}), ('L', {[SQ <LIT_CHARS "in working tree">]})])
      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -w "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}file:1:foo mmap bar\n"> <LIT_CHARS "\t\t\techo ${HC}file:3:foo_mmap bar mmap\n"> <LIT_CHARS "\t\t\techo ${HC}file:4:foo mmap bar_mmap\n"> <LIT_CHARS "\t\t\techo ${HC}file:5:foo_mmap bar mmap baz\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.linenumber=false grep -n -w -e mmap $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -w "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}file:1:foo mmap bar\n"> <LIT_CHARS "\t\t\techo ${HC}file:3:foo_mmap bar mmap\n"> <LIT_CHARS "\t\t\techo ${HC}file:4:foo mmap bar_mmap\n"> <LIT_CHARS "\t\t\techo ${HC}file:5:foo_mmap bar mmap baz\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.linenumber=true grep -w -e mmap $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -w "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}file:foo mmap bar\n"> <LIT_CHARS "\t\t\techo ${HC}file:foo_mmap bar mmap\n"> <LIT_CHARS "\t\t\techo ${HC}file:foo mmap bar_mmap\n"> <LIT_CHARS "\t\t\techo ${HC}file:foo_mmap bar mmap baz\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.linenumber=true grep --no-line-number -w -e mmap $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -w "][VarSub L][LIT_CHARS " (w)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t: >expected &&\n"> <LIT_CHARS "\t\ttest_must_fail git grep -n -w -e \"^w\" >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -w "][VarSub L][LIT_CHARS " (x)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}x:1:x x xx x\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep -n -w -e \"x xx* x\" $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -w "][VarSub L][LIT_CHARS " (y-1)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}y:1:y yy\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep -n -w -e \"^y\" $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -w "][VarSub L][LIT_CHARS " (y-2)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t: >expected &&\n"> <LIT_CHARS "\t\tif git grep -n -w -e \"^y y\" $H >actual\n"> <LIT_CHARS "\t\tthen\n"> <LIT_CHARS "\t\t\techo should not have matched\n"> <LIT_CHARS "\t\t\tcat actual\n"> <LIT_CHARS "\t\t\tfalse\n"> <LIT_CHARS "\t\telse\n"> <LIT_CHARS "\t\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t\tfi\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -w "][VarSub L][LIT_CHARS " (z)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t: >expected &&\n"> <LIT_CHARS "\t\tif git grep -n -w -e \"^z\" $H >actual\n"> <LIT_CHARS "\t\tthen\n"> <LIT_CHARS "\t\t\techo should not have matched\n"> <LIT_CHARS "\t\t\tcat actual\n"> <LIT_CHARS "\t\t\tfalse\n"> <LIT_CHARS "\t\telse\n"> <LIT_CHARS "\t\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t\tfi\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " (t-1)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"${HC}t/t:1:test\" >expected &&\n"> <LIT_CHARS "\t\tgit grep -n -e test $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " (t-2)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"${HC}t:1:test\" >expected &&\n"> <LIT_CHARS "\t\t(\n"> <LIT_CHARS "\t\t\tcd t &&\n"> <LIT_CHARS "\t\t\tgit grep -n -e test $H\n"> <LIT_CHARS "\t\t) >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " (t-3)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"${HC}t/t:1:test\" >expected &&\n"> <LIT_CHARS "\t\t(\n"> <LIT_CHARS "\t\t\tcd t &&\n"> <LIT_CHARS "\t\t\tgit grep --full-name -n -e test $H\n"> <LIT_CHARS "\t\t) >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep -c "][VarSub L][LIT_CHARS " (no /dev/null)"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t! git grep -c test $H | grep /dev/null\n"> <LIT_CHARS "        ">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep --max-depth -1 "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}t/a/v:1:vvv\n"> <LIT_CHARS "\t\t\techo ${HC}t/v:1:vvv\n"> <LIT_CHARS "\t\t\techo ${HC}v:1:vvv\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep --max-depth -1 -n -e vvv $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep --max-depth 0 "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}v:1:vvv\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep --max-depth 0 -n -e vvv $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep --max-depth 0 -- '*' "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}t/a/v:1:vvv\n"> <LIT_CHARS "\t\t\techo ${HC}t/v:1:vvv\n"> <LIT_CHARS "\t\t\techo ${HC}v:1:vvv\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep --max-depth 0 -n -e vvv $H -- \"*\" >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep --max-depth 1 "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}t/v:1:vvv\n"> <LIT_CHARS "\t\t\techo ${HC}v:1:vvv\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep --max-depth 1 -n -e vvv $H >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep --max-depth 0 -- t "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}t/v:1:vvv\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep --max-depth 0 -n -e vvv $H -- t >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep --max-depth 0 -- . t "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}t/v:1:vvv\n"> <LIT_CHARS "\t\t\techo ${HC}v:1:vvv\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep --max-depth 0 -n -e vvv $H -- . t >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep --max-depth 0 -- t . "][VarSub L]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo ${HC}t/v:1:vvv\n"> <LIT_CHARS "\t\t\techo ${HC}v:1:vvv\n"> <LIT_CHARS "\t\t} >expected &&\n"> <LIT_CHARS "\t\tgit grep --max-depth 0 -n -e vvv $H -- t . >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " with grep.extendedRegexp=false"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:a+bc\" >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.extendedRegexp=false grep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " with grep.extendedRegexp=true"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:abc\" >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.extendedRegexp=true grep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " with grep.patterntype=basic"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:a+bc\" >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.patterntype=basic grep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " with grep.patterntype=extended"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:abc\" >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.patterntype=extended grep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " with grep.patterntype=fixed"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:a+b*c\" >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.patterntype=fixed grep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " with grep.patterntype=perl"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:a+b*c\" >expected &&\n"> <LIT_CHARS "\t\tgit -c grep.patterntype=perl grep \"a\\x{2b}b\\x{2a}c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " with grep.patternType=default and grep.extendedRegexp=true"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:abc\" >expected &&\n"> <LIT_CHARS "\t\tgit \\\n"> <LIT_CHARS "\t\t\t-c grep.patternType=default \\\n"> <LIT_CHARS "\t\t\t-c grep.extendedRegexp=true \\\n"> <LIT_CHARS "\t\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[DQ [LIT_CHARS "grep "][VarSub L][LIT_CHARS " with grep.extendedRegexp=true and grep.patternType=default"]]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:abc\" >expected &&\n"> <LIT_CHARS "\t\tgit \\\n"> <LIT_CHARS "\t\t\t-c grep.extendedRegexp=true \\\n"> <LIT_CHARS "\t\t\t-c grep.patternType=default \\\n"> <LIT_CHARS "\t\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep $L with grep.patternType=extended and grep.extendedRegexp=false">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:abc\" >expected &&\n"> <LIT_CHARS "\t\tgit \\\n"> <LIT_CHARS "\t\t\t-c grep.patternType=extended \\\n"> <LIT_CHARS "\t\t\t-c grep.extendedRegexp=false \\\n"> <LIT_CHARS "\t\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep $L with grep.patternType=basic and grep.extendedRegexp=true">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:a+bc\" >expected &&\n"> <LIT_CHARS "\t\tgit \\\n"> <LIT_CHARS "\t\t\t-c grep.patternType=basic \\\n"> <LIT_CHARS "\t\t\t-c grep.extendedRegexp=true \\\n"> <LIT_CHARS "\t\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep $L with grep.extendedRegexp=false and grep.patternType=extended">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:abc\" >expected &&\n"> <LIT_CHARS "\t\tgit \\\n"> <LIT_CHARS "\t\t\t-c grep.extendedRegexp=false \\\n"> <LIT_CHARS "\t\t\t-c grep.patternType=extended \\\n"> <LIT_CHARS "\t\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
      (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep $L with grep.extendedRegexp=true and grep.patternType=basic">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t\techo \"ab:a+bc\" >expected &&\n"> <LIT_CHARS "\t\tgit \\\n"> <LIT_CHARS "\t\t\t-c grep.extendedRegexp=true \\\n"> <LIT_CHARS "\t\t\t-c grep.patternType=basic \\\n"> <LIT_CHARS "\t\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\t\ttest_cmp expected actual\n"> <LIT_CHARS "\t">]}      )
    )
  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "file\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -l -C">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -l -C1 foo >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "file:5\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -l -C">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -c -C1 foo >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -L -C">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit ls-files >expected &&\n"> <LIT_CHARS "\tgit grep -L -C1 nonexistent_string >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "file:foo mmap bar_mmap\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -e A --and -e B">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -e \"foo mmap\" --and -e bar_mmap >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "file:foo_mmap bar mmap\n"][LIT_CHARS "file:foo_mmap bar mmap baz\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep ( -e A --or -e B ) --and -e B">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep \\( -e foo_ --or -e baz \\) \\\n"> <LIT_CHARS "\t\t--and -e \" mmap\" >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "file:foo mmap bar\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -e A --and --not -e B">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -e \"foo mmap\" --and --not -e bar_mmap >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep should ignore GREP_OPTIONS">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tGREP_OPTIONS=-v git grep \" mmap bar\\$\" >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -f, non-existent file">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git grep -f patterns\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "file:foo mmap bar\n"][LIT_CHARS "file:foo_mmap bar\n"][LIT_CHARS "file:foo_mmap bar mmap\n"][LIT_CHARS "file:foo mmap bar_mmap\n"][LIT_CHARS "file:foo_mmap bar mmap baz\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS pattern]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "mmap\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -f, one pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -f pattern >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "file:foo mmap bar\n"][LIT_CHARS "file:foo_mmap bar\n"][LIT_CHARS "file:foo_mmap bar mmap\n"][LIT_CHARS "file:foo mmap bar_mmap\n"][LIT_CHARS "file:foo_mmap bar mmap baz\n"][LIT_CHARS "t/a/v:vvv\n"][LIT_CHARS "t/v:vvv\n"][LIT_CHARS "v:vvv\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS patterns]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "mmap\n"][LIT_CHARS "vvv\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -f, multiple patterns">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -f patterns >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep, multiple patterns">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep \"$(cat patterns)\" >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "file:foo mmap bar\n"][LIT_CHARS "file:foo_mmap bar\n"][LIT_CHARS "file:foo_mmap bar mmap\n"][LIT_CHARS "file:foo mmap bar_mmap\n"][LIT_CHARS "file:foo_mmap bar mmap baz\n"][LIT_CHARS "t/a/v:vvv\n"][LIT_CHARS "t/v:vvv\n"][LIT_CHARS "v:vvv\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS patterns]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "\n"][LIT_CHARS "mmap\n"][LIT_CHARS "\n"][LIT_CHARS "vvv\n"][LIT_CHARS "\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -f, ignore empty lines">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -f patterns >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -f, ignore empty lines, read patterns from stdin">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -f - <patterns >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "y:y yy\n"][LIT_CHARS "--\n"][LIT_CHARS "z:zzz\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -q, silently report matches">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t>empty &&\n"> <LIT_CHARS "\tgit grep -q mmap >actual &&\n"> <LIT_CHARS "\ttest_cmp empty actual &&\n"> <LIT_CHARS "\ttest_must_fail git grep -q qfwfq >actual &&\n"> <LIT_CHARS "\ttest_cmp empty actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -C1 hunk mark between files">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -C1 \"^[yz]\" >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log grep setup">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo a >>file &&\n"> <LIT_CHARS "\ttest_tick &&\n"> <LIT_CHARS "\tGIT_AUTHOR_NAME=\"With * Asterisk\" \\\n"> <LIT_CHARS "\tGIT_AUTHOR_EMAIL=\"xyzzy@frotz.com\" \\\n"> <LIT_CHARS "\tgit commit -a -m \"second\" &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\techo a >>file &&\n"> <LIT_CHARS "\ttest_tick &&\n"> <LIT_CHARS "\tgit commit -a -m \"third\" &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\techo a >>file &&\n"> <LIT_CHARS "\ttest_tick &&\n"> <LIT_CHARS "\tGIT_AUTHOR_NAME=\"Night Fall\" \\\n"> <LIT_CHARS "\tGIT_AUTHOR_EMAIL=\"nitfol@frobozz.com\" \\\n"> <LIT_CHARS "\tgit commit -a -m \"fourth\"\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log grep (1)">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --author=author --pretty=tformat:%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo third && echo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log grep (2)">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --author=\" * \" -F --pretty=tformat:%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo second\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log grep (3)">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --author=\"^A U\" --pretty=tformat:%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo third && echo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log grep (4)">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --author=\"frotz\\.com>$\" --pretty=tformat:%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo second\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log grep (5)">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --author=Thor -F --pretty=tformat:%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo third && echo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log grep (6)">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --author=-0700  --pretty=tformat:%s >actual &&\n"> <LIT_CHARS "\t>expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log with multiple --grep uses union">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --grep=i --grep=r --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo fourth && echo third && echo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log --all-match with multiple --grep uses intersection">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --all-match --grep=i --grep=r --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo third\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log with multiple --author uses union">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --author=\"Thor\" --author=\"Aster\" --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t    echo third && echo second && echo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log --all-match with multiple --author still uses union">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit log --all-match --author=\"Thor\" --author=\"Aster\" --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t    echo third && echo second && echo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log --grep --author uses intersection">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t# grep matches only third and fourth\n"> <LIT_CHARS "\t# author matches only initial and third\n"> <LIT_CHARS "\tgit log --author=\"A U Thor\" --grep=r --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo third\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log --grep --grep --author takes union of greps and intersects with author">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t# grep matches initial and second but not third\n"> <LIT_CHARS "\t# author matches only initial and third\n"> <LIT_CHARS "\tgit log --author=\"A U Thor\" --grep=s --grep=l --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log ---all-match -grep --author --author still takes union of authors and intersects with grep">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t# grep matches only initial and third\n"> <LIT_CHARS "\t# author matches all but second\n"> <LIT_CHARS "\tgit log --all-match --author=\"Thor\" --author=\"Night\" --grep=i --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t    echo third && echo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log --grep --author --author takes union of authors and intersects with grep">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t# grep matches only initial and third\n"> <LIT_CHARS "\t# author matches all but second\n"> <LIT_CHARS "\tgit log --author=\"Thor\" --author=\"Night\" --grep=i --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t    echo third && echo initial\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "log --all-match --grep --grep --author takes intersection">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t# grep matches only third\n"> <LIT_CHARS "\t# author matches only initial and third\n"> <LIT_CHARS "\tgit log --all-match --author=\"A U Thor\" --grep=i --grep=r --format=%s >actual &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo third\n"> <LIT_CHARS "\t} >expect &&\n"> <LIT_CHARS "\ttest_cmp expect actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep with CE_VALID file">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit update-index --assume-unchanged t/t &&\n"> <LIT_CHARS "\trm t/t &&\n"> <LIT_CHARS "\ttest \"$(git grep test)\" = \"t/t:test\" &&\n"> <LIT_CHARS "\tgit update-index --no-assume-unchanged t/t &&\n"> <LIT_CHARS "\tgit checkout t/t\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c=#include <stdio.h>\n"][LIT_CHARS "hello.c:\treturn 0;\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -p with userdiff">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit config diff.custom.funcname \"^#\" &&\n"> <LIT_CHARS "\techo \"hello.c diff=custom\" >.gitattributes &&\n"> <LIT_CHARS "\tgit grep -p return >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c=int main(int argc, const char **argv)\n"][LIT_CHARS "hello.c:\treturn 0;\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -p">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\trm -f .gitattributes &&\n"> <LIT_CHARS "\tgit grep -p return >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c-#include <stdio.h>\n"][LIT_CHARS "hello.c=int main(int argc, const char **argv)\n"][LIT_CHARS "hello.c-{\n"][LIT_CHARS "hello.c-\tprintf("][RIGHT_D_QUOTE "\""][LIT_CHARS "Hello world."][\ LIT_ESCAPED_CHAR "\\n"][RIGHT_D_QUOTE "\""][LIT_CHARS ");\n"][LIT_CHARS "hello.c:\treturn 0;\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -p -B5">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -p -B5 return >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c=int main(int argc, const char **argv)\n"][LIT_CHARS "hello.c-{\n"][LIT_CHARS "hello.c-\tprintf("][RIGHT_D_QUOTE "\""][LIT_CHARS "Hello world."][\ LIT_ESCAPED_CHAR "\\n"][RIGHT_D_QUOTE "\""][LIT_CHARS ");\n"][LIT_CHARS "hello.c:\treturn 0;\n"][LIT_CHARS "hello.c-\t/* char ?? */\n"][LIT_CHARS "hello.c-}\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -W">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -W return >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c=\tprintf("][RIGHT_D_QUOTE "\""][LIT_CHARS "Hello world."][\ LIT_ESCAPED_CHAR "\\n"][RIGHT_D_QUOTE "\""][LIT_CHARS ");\n"][LIT_CHARS "hello.c:\treturn 0;\n"][LIT_CHARS "hello.c-\t/* char ?? */\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -W with userdiff">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_when_finished \"rm -f .gitattributes\" &&\n"> <LIT_CHARS "\tgit config diff.custom.xfuncname \"(printf.*|})$\" &&\n"> <LIT_CHARS "\techo \"hello.c diff=custom\" >.gitattributes &&\n"> <LIT_CHARS "\tgit grep -W return >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep from a subdirectory to search wider area (1)">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tmkdir -p s &&\n"> <LIT_CHARS "\t(\n"> <LIT_CHARS "\t\tcd s && git grep \"x x x\" ..\n"> <LIT_CHARS "\t)\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep from a subdirectory to search wider area (2)">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tmkdir -p s &&\n"> <LIT_CHARS "\t(\n"> <LIT_CHARS "\t\tcd s || exit 1\n"> <LIT_CHARS "\t\t( git grep xxyyzz .. >out ; echo $? >status )\n"> <LIT_CHARS "\t\t! test -s out &&\n"> <LIT_CHARS "\t\ttest 1 = $(cat status)\n"> <LIT_CHARS "\t)\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c:int main(int argc, const char **argv)\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -Fi">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -Fi \"CHAR *\" >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "outside of git repository">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\trm -fr non &&\n"> <LIT_CHARS "\tmkdir -p non/git/sub &&\n"> <LIT_CHARS "\techo hello >non/git/file1 &&\n"> <LIT_CHARS "\techo world >non/git/sub/file2 &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo file1:hello &&\n"> <LIT_CHARS "\t\techo sub/file2:world\n"> <LIT_CHARS "\t} >non/expect.full &&\n"> <LIT_CHARS "\techo file2:world >non/expect.sub &&\n"> <LIT_CHARS "\t(\n"> <LIT_CHARS "\t\tGIT_CEILING_DIRECTORIES=\"$(pwd)/non/git\" &&\n"> <LIT_CHARS "\t\texport GIT_CEILING_DIRECTORIES &&\n"> <LIT_CHARS "\t\tcd non/git &&\n"> <LIT_CHARS "\t\ttest_must_fail git grep o &&\n"> <LIT_CHARS "\t\tgit grep --no-index o >../actual.full &&\n"> <LIT_CHARS "\t\ttest_cmp ../expect.full ../actual.full\n"> <LIT_CHARS "\t\tcd sub &&\n"> <LIT_CHARS "\t\ttest_must_fail git grep o &&\n"> <LIT_CHARS "\t\tgit grep --no-index o >../../actual.sub &&\n"> <LIT_CHARS "\t\ttest_cmp ../../expect.sub ../../actual.sub\n"> <LIT_CHARS "\t) &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\techo \".*o*\" >non/git/.gitignore &&\n"> <LIT_CHARS "\t(\n"> <LIT_CHARS "\t\tGIT_CEILING_DIRECTORIES=\"$(pwd)/non/git\" &&\n"> <LIT_CHARS "\t\texport GIT_CEILING_DIRECTORIES &&\n"> <LIT_CHARS "\t\tcd non/git &&\n"> <LIT_CHARS "\t\ttest_must_fail git grep o &&\n"> <LIT_CHARS "\t\tgit grep --no-index --exclude-standard o >../actual.full &&\n"> <LIT_CHARS "\t\ttest_cmp ../expect.full ../actual.full &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\t\t{\n"> <LIT_CHARS "\t\t\techo \".gitignore:.*o*\"\n"> <LIT_CHARS "\t\t\tcat ../expect.full\n"> <LIT_CHARS "\t\t} >../expect.with.ignored &&\n"> <LIT_CHARS "\t\tgit grep --no-index --no-exclude o >../actual.full &&\n"> <LIT_CHARS "\t\ttest_cmp ../expect.with.ignored ../actual.full\n"> <LIT_CHARS "\t)\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "inside git repository but with --no-index">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\trm -fr is &&\n"> <LIT_CHARS "\tmkdir -p is/git/sub &&\n"> <LIT_CHARS "\techo hello >is/git/file1 &&\n"> <LIT_CHARS "\techo world >is/git/sub/file2 &&\n"> <LIT_CHARS "\techo \".*o*\" >is/git/.gitignore &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo file1:hello &&\n"> <LIT_CHARS "\t\techo sub/file2:world\n"> <LIT_CHARS "\t} >is/expect.unignored &&\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo \".gitignore:.*o*\" &&\n"> <LIT_CHARS "\t\tcat is/expect.unignored\n"> <LIT_CHARS "\t} >is/expect.full &&\n"> <LIT_CHARS "\t: >is/expect.empty &&\n"> <LIT_CHARS "\techo file2:world >is/expect.sub &&\n"> <LIT_CHARS "\t(\n"> <LIT_CHARS "\t\tcd is/git &&\n"> <LIT_CHARS "\t\tgit init &&\n"> <LIT_CHARS "\t\ttest_must_fail git grep o >../actual.full &&\n"> <LIT_CHARS "\t\ttest_cmp ../expect.empty ../actual.full &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\t\tgit grep --untracked o >../actual.unignored &&\n"> <LIT_CHARS "\t\ttest_cmp ../expect.unignored ../actual.unignored &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\t\tgit grep --no-index o >../actual.full &&\n"> <LIT_CHARS "\t\ttest_cmp ../expect.full ../actual.full &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\t\tgit grep --no-index --exclude-standard o >../actual.unignored &&\n"> <LIT_CHARS "\t\ttest_cmp ../expect.unignored ../actual.unignored &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\t\tcd sub &&\n"> <LIT_CHARS "\t\ttest_must_fail git grep o >../../actual.sub &&\n"> <LIT_CHARS "\t\ttest_cmp ../../expect.empty ../../actual.sub &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\t\tgit grep --no-index o >../../actual.sub &&\n"> <LIT_CHARS "\t\ttest_cmp ../../expect.sub ../../actual.sub &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\t\tgit grep --untracked o >../../actual.sub &&\n"> <LIT_CHARS "\t\ttest_cmp ../../expect.sub ../../actual.sub\n"> <LIT_CHARS "\t)\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "setup double-dash tests">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "cat >double-dash <<EOF &&\n"> <LIT_CHARS "--\n"> <LIT_CHARS "->\n"> <LIT_CHARS "other\n"> <LIT_CHARS "EOF\n"> <LIT_CHARS "git add double-dash\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "double-dash:->\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -- pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -- \"->\" >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -- pattern -- pathspec">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -- \"->\" -- double-dash >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -e pattern -- path">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -e \"->\" -- double-dash >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "double-dash:--\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -e -- -- path">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -e -- -- double-dash >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c:int main(int argc, const char **argv)\n"][LIT_CHARS "hello.c:\tprintf("][RIGHT_D_QUOTE "\""][LIT_CHARS "Hello world."][\ LIT_ESCAPED_CHAR "\\n"][RIGHT_D_QUOTE "\""][LIT_CHARS ");\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep --perl-regexp pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep --perl-regexp \"\\p{Ps}.*?\\p{Pe}\" hello.c >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -P pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -P \"\\p{Ps}.*?\\p{Pe}\" hello.c >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep pattern with grep.extendedRegexp=true">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t>empty &&\n"> <LIT_CHARS "\ttest_must_fail git -c grep.extendedregexp=true \\\n"> <LIT_CHARS "\t\tgrep \"\\p{Ps}.*?\\p{Pe}\" hello.c >actual &&\n"> <LIT_CHARS "\ttest_cmp empty actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -P pattern with grep.extendedRegexp=true">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit -c grep.extendedregexp=true \\\n"> <LIT_CHARS "\t\tgrep -P \"\\p{Ps}.*?\\p{Pe}\" hello.c >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -P -v pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo \"ab:a+b*c\"\n"> <LIT_CHARS "\t\techo \"ab:a+bc\"\n"> <LIT_CHARS "\t} >expected &&\n"> <LIT_CHARS "\tgit grep -P -v \"abc\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -P -i pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tcat >expected <<-EOF &&\n"> <LIT_CHARS "\thello.c:\tprintf(\"Hello world.\\n\");\n"> <LIT_CHARS "\tEOF\n"> <LIT_CHARS "\tgit grep -P -i \"PRINTF\\([^\\d]+\\)\" hello.c >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -P -w pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo \"hello_world:Hello world\"\n"> <LIT_CHARS "\t\techo \"hello_world:HeLLo world\"\n"> <LIT_CHARS "\t} >expected &&\n"> <LIT_CHARS "\tgit grep -P -w \"He((?i)ll)o\" hello_world >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -G invalidpattern properly dies ">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git grep -G \"a[\"\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep invalidpattern properly dies with grep.patternType=basic">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git -c grep.patterntype=basic grep \"a[\"\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -E invalidpattern properly dies ">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git grep -E \"a[\"\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep invalidpattern properly dies with grep.patternType=extended">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git -c grep.patterntype=extended grep \"a[\"\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -P invalidpattern properly dies ">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git grep -P \"a[\"\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep invalidpattern properly dies with grep.patternType=perl">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_must_fail git -c grep.patterntype=perl grep \"a[\"\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -G -E -F pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:a+b*c\" >expected &&\n"> <LIT_CHARS "\tgit grep -G -E -F \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep pattern with grep.patternType=basic, =extended, =fixed">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:a+b*c\" >expected &&\n"> <LIT_CHARS "\tgit \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=basic \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=extended \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=fixed \\\n"> <LIT_CHARS "\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -E -F -G pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:a+bc\" >expected &&\n"> <LIT_CHARS "\tgit grep -E -F -G \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep pattern with grep.patternType=extended, =fixed, =basic">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:a+bc\" >expected &&\n"> <LIT_CHARS "\tgit \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=extended \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=fixed \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=basic \\\n"> <LIT_CHARS "\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -F -G -E pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:abc\" >expected &&\n"> <LIT_CHARS "\tgit grep -F -G -E \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep pattern with grep.patternType=fixed, =basic, =extended">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:abc\" >expected &&\n"> <LIT_CHARS "\tgit \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=fixed \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=basic \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=extended \\\n"> <LIT_CHARS "\t\tgrep \"a+b*c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -G -F -P -E pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t>empty &&\n"> <LIT_CHARS "\ttest_must_fail git grep -G -F -P -E \"a\\x{2b}b\\x{2a}c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp empty actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep pattern with grep.patternType=fixed, =basic, =perl, =extended">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t>empty &&\n"> <LIT_CHARS "\ttest_must_fail git \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=fixed \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=basic \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=perl \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=extended \\\n"> <LIT_CHARS "\t\tgrep \"a\\x{2b}b\\x{2a}c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp empty actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -G -F -E -P pattern">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:a+b*c\" >expected &&\n"> <LIT_CHARS "\tgit grep -G -F -E -P \"a\\x{2b}b\\x{2a}c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep pattern with grep.patternType=fixed, =basic, =extended, =perl">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:a+b*c\" >expected &&\n"> <LIT_CHARS "\tgit \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=fixed \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=basic \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=extended \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=perl \\\n"> <LIT_CHARS "\t\tgrep \"a\\x{2b}b\\x{2a}c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -P pattern with grep.patternType=fixed">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:a+b*c\" >expected &&\n"> <LIT_CHARS "\tgit \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=fixed \\\n"> <LIT_CHARS "\t\tgrep -P \"a\\x{2b}b\\x{2a}c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -F pattern with grep.patternType=basic">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\techo \"ab:a+b*c\" >expected &&\n"> <LIT_CHARS "\tgit \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=basic \\\n"> <LIT_CHARS "\t\tgrep -F \"*c\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -G pattern with grep.patternType=fixed">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo \"ab:a+b*c\"\n"> <LIT_CHARS "\t\techo \"ab:a+bc\"\n"> <LIT_CHARS "\t} >expected &&\n"> <LIT_CHARS "\tgit \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=fixed \\\n"> <LIT_CHARS "\t\tgrep -G \"a+b\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep -E pattern with grep.patternType=fixed">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\t{\n"> <LIT_CHARS "\t\techo \"ab:a+b*c\"\n"> <LIT_CHARS "\t\techo \"ab:a+bc\"\n"> <LIT_CHARS "\t\techo \"ab:abc\"\n"> <LIT_CHARS "\t} >expected &&\n"> <LIT_CHARS "\tgit \\\n"> <LIT_CHARS "\t\t-c grep.patterntype=fixed \\\n"> <LIT_CHARS "\t\tgrep -E \"a+\" ab >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (FunctionDef test_config []
    (AndOr OP_AND_IF
      (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[DQ [VarSub 1]]} {[DQ [VarSub 2]]}      )
      (Com {[LIT_CHARS test_when_finished]} {[DQ [LIT_CHARS "git config --unset "][VarSub 1]]}      )
    )
  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c<RED>:<RESET>int main(int argc, const char **argv)\n"][LIT_CHARS "hello.c<RED>-<RESET>{\n"][LIT_CHARS "<RED>--<RESET>\n"][LIT_CHARS "hello.c<RED>:<RESET>\t/* char ?? */\n"][LIT_CHARS "hello.c<RED>-<RESET>}\n"][LIT_CHARS "<RED>--<RESET>\n"][LIT_CHARS "hello_world<RED>:<RESET>Hello_world\n"][LIT_CHARS "hello_world<RED>-<RESET>HeLLo_world\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep --color, separator">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_config color.grep.context\t\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.filename\t\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.function\t\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.linenumber\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.match\t\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.selected\t\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.separator\tred &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep --color=always -A1 -e char -e lo_w hello.c hello_world |\n"> <LIT_CHARS "\ttest_decode_color >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c:int main(int argc, const char **argv)\n"][LIT_CHARS "hello.c:\t/* char ?? */\n"][LIT_CHARS "\n"][LIT_CHARS "hello_world:Hello_world\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep --break">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep --break -e char -e lo_w hello.c hello_world >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c:int main(int argc, const char **argv)\n"][LIT_CHARS "hello.c-{\n"][LIT_CHARS "--\n"][LIT_CHARS "hello.c:\t/* char ?? */\n"][LIT_CHARS "hello.c-}\n"][LIT_CHARS "\n"][LIT_CHARS "hello_world:Hello_world\n"][LIT_CHARS "hello_world-HeLLo_world\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep --break with context">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep --break -A1 -e char -e lo_w hello.c hello_world >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "hello.c\n"][LIT_CHARS "int main(int argc, const char **argv)\n"][LIT_CHARS "\t/* char ?? */\n"][LIT_CHARS "hello_world\n"][LIT_CHARS "Hello_world\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "grep --heading">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep --heading -e char -e lo_w hello.c hello_world >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "<BOLD;GREEN>hello.c<RESET>\n"][LIT_CHARS "2:int main(int argc, const <BLACK;BYELLOW>char<RESET> **argv)\n"][LIT_CHARS "6:\t/* <BLACK;BYELLOW>char<RESET> ?? */\n"][LIT_CHARS "\n"][LIT_CHARS "<BOLD;GREEN>hello_world<RESET>\n"][LIT_CHARS "3:Hel<BLACK;BYELLOW>lo_w<RESET>orld\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[SQ <LIT_CHARS "mimic ack-grep --group">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\ttest_config color.grep.context\t\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.filename\t\t\"bold green\" &&\n"> <LIT_CHARS "\ttest_config color.grep.function\t\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.linenumber\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.match\t\t\"black yellow\" &&\n"> <LIT_CHARS "\ttest_config color.grep.selected\t\tnormal &&\n"> <LIT_CHARS "\ttest_config color.grep.separator\tnormal &&\n"> <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep --break --heading -n --color \\\n"> <LIT_CHARS "\t\t-e char -e lo_w hello.c hello_world |\n"> <LIT_CHARS "\ttest_decode_color >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS cat]}
    <
    (FilenameRedirectNode filename={[LIT_CHARS expected]} <REDIR_GREAT ">"> 1),
    (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "space: line with leading space1\n"][LIT_CHARS "space: line with leading space2\n"][LIT_CHARS "space: line with leading space3\n"]]} <REDIR_DLESS "<<"> 0),
    >
  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -E \"^ \"">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -E \"^ \" space >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS LIBPCRE]} {[SQ <LIT_CHARS "grep -P \"^ \"">]} {[SQ <LIT_CHARS "\n"> <LIT_CHARS "\tgit grep -P \"^ \" space >actual &&\n"> <LIT_CHARS "\ttest_cmp expected actual\n">]}  )
  (Com {[LIT_CHARS test_done]}  )
)