(command.CommandList
  children: [
    (command.ShFunction
      name: test_diff_frobnitz
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:16)
                  fd: -1
                  arg_word: {(file1)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:19)
                  fd: -1
                  here_begin: 
                    {
                      (word_part.EscapedLiteral
                        token: (Token id:Id.Lit_EscapedChar val:'\\E' span_id:20)
                      ) (OF)
                    }
                  here_end_span_id: 49
                  stdin_parts: [
                    ('#include <stdio.h>\n')
                    ('\n')
                    ('// Frobs foo heartily\n')
                    ('int frobnitz(int foo)\n')
                    ('{\n')
                    ('    int i;\n')
                    ('    for(i = 0; i < 10; i++)\n')
                    ('    {\n')
                    ('        printf("Your answer is: ");\n')
                    ('        printf("%d\\n", foo);\n')
                    ('    }\n')
                    ('}\n')
                    ('\n')
                    ('int fact(int n)\n')
                    ('{\n')
                    ('    if(n > 1)\n')
                    ('    {\n')
                    ('        return fact(n-1) * n;\n')
                    ('    }\n')
                    ('    return 1;\n')
                    ('}\n')
                    ('\n')
                    ('int main(int argc, char **argv)\n')
                    ('{\n')
                    ('    frobnitz(fact(10));\n')
                    ('}\n')
                  ]
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:54)
                  fd: -1
                  arg_word: {(file2)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:57)
                  fd: -1
                  here_begin: 
                    {
                      (word_part.EscapedLiteral
                        token: (Token id:Id.Lit_EscapedChar val:'\\E' span_id:58)
                      ) (OF)
                    }
                  here_end_span_id: 86
                  stdin_parts: [
                    ('#include <stdio.h>\n')
                    ('\n')
                    ('int fib(int n)\n')
                    ('{\n')
                    ('    if(n > 2)\n')
                    ('    {\n')
                    ('        return fib(n-1) + fib(n-2);\n')
                    ('    }\n')
                    ('    return 1;\n')
                    ('}\n')
                    ('\n')
                    ('// Frobs foo heartily\n')
                    ('int frobnitz(int foo)\n')
                    ('{\n')
                    ('    int i;\n')
                    ('    for(i = 0; i < 10; i++)\n')
                    ('    {\n')
                    ('        printf("%d\\n", foo);\n')
                    ('    }\n')
                    ('}\n')
                    ('\n')
                    ('int main(int argc, char **argv)\n')
                    ('{\n')
                    ('    frobnitz(fib(10));\n')
                    ('}\n')
                  ]
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:91)
                  fd: -1
                  arg_word: {(expect)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:94)
                  fd: -1
                  here_begin: 
                    {
                      (word_part.EscapedLiteral
                        token: (Token id:Id.Lit_EscapedChar val:'\\E' span_id:95)
                      ) (OF)
                    }
                  here_end_span_id: 139
                  stdin_parts: [
                    ('diff --git a/file1 b/file2\n')
                    ('index 6faa5a3..e3af329 100644\n')
                    ('--- a/file1\n')
                    ('+++ b/file2\n')
                    ('@@ -1,26 +1,25 @@\n')
                    (' #include <stdio.h>\n')
                    (' \n')
                    ('+int fib(int n)\n')
                    ('+{\n')
                    ('+    if(n > 2)\n')
                    ('+    {\n')
                    ('+        return fib(n-1) + fib(n-2);\n')
                    ('+    }\n')
                    ('+    return 1;\n')
                    ('+}\n')
                    ('+\n')
                    (' // Frobs foo heartily\n')
                    (' int frobnitz(int foo)\n')
                    (' {\n')
                    ('     int i;\n')
                    ('     for(i = 0; i < 10; i++)\n')
                    ('     {\n')
                    ('-        printf("Your answer is: ");\n')
                    ('         printf("%d\\n", foo);\n')
                    ('     }\n')
                    (' }\n')
                    (' \n')
                    ('-int fact(int n)\n')
                    ('-{\n')
                    ('-    if(n > 1)\n')
                    ('-    {\n')
                    ('-        return fact(n-1) * n;\n')
                    ('-    }\n')
                    ('-    return 1;\n')
                    ('-}\n')
                    ('-\n')
                    (' int main(int argc, char **argv)\n')
                    (' {\n')
                    ('-    frobnitz(fact(10));\n')
                    ('+    frobnitz(fib(10));\n')
                    (' }\n')
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:STRATEGY)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [142]
                )
              ]
            )
            (C {(test_expect_success)} {(DQ ($ Id.VSub_DollarName '$STRATEGY') (' diff'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:155) 
                  (Token
                    id: Id.Lit_Chars
                    val: 
'\t\ttest_must_fail git diff --no-index "--$STRATEGY" file1 file2 > output &&\n'
                    span_id: 156
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:157) 
                  (Token id:Id.Lit_Chars val:'\t' span_id:158)
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ ($ Id.VSub_DollarName '$STRATEGY') (' diff output is valid'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:171) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tmv file2 expect &&\n'
                    span_id: 172
                  ) (Token id:Id.Lit_Chars val:'\t\tgit apply < output &&\n' span_id:173) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_cmp expect file2\n'
                    span_id: 174
                  ) (Token id:Id.Lit_Chars val:'\t' span_id:175)
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: test_diff_unique
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:190)
                  fd: -1
                  arg_word: {(uniq1)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:193)
                  fd: -1
                  here_begin: 
                    {
                      (word_part.EscapedLiteral
                        token: (Token id:Id.Lit_EscapedChar val:'\\E' span_id:194)
                      ) (OF)
                    }
                  here_end_span_id: 203
                  stdin_parts: [('1\n') ('2\n') ('3\n') ('4\n') ('5\n') ('6\n')]
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:208)
                  fd: -1
                  arg_word: {(uniq2)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:211)
                  fd: -1
                  here_begin: 
                    {
                      (word_part.EscapedLiteral
                        token: (Token id:Id.Lit_EscapedChar val:'\\E' span_id:212)
                      ) (OF)
                    }
                  here_end_span_id: 221
                  stdin_parts: [('a\n') ('b\n') ('c\n') ('d\n') ('e\n') ('f\n')]
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:226)
                  fd: -1
                  arg_word: {(expect)}
                )
                (redir.HereDoc
                  op: (Token id:Id.Redir_DLess val:'<<' span_id:229)
                  fd: -1
                  here_begin: 
                    {
                      (word_part.EscapedLiteral
                        token: (Token id:Id.Lit_EscapedChar val:'\\E' span_id:230)
                      ) (OF)
                    }
                  here_end_span_id: 250
                  stdin_parts: [
                    ('diff --git a/uniq1 b/uniq2\n')
                    ('index b414108..0fdf397 100644\n')
                    ('--- a/uniq1\n')
                    ('+++ b/uniq2\n')
                    ('@@ -1,6 +1,6 @@\n')
                    ('-1\n')
                    ('-2\n')
                    ('-3\n')
                    ('-4\n')
                    ('-5\n')
                    ('-6\n')
                    ('+a\n')
                    ('+b\n')
                    ('+c\n')
                    ('+d\n')
                    ('+e\n')
                    ('+f\n')
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:STRATEGY)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [253]
                )
              ]
            )
            (C {(test_expect_success)} 
              {(SQ (Token id:Id.Lit_Chars val:'completely different files' span_id:261))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:265) 
                  (Token
                    id: Id.Lit_Chars
                    val: 
'\t\ttest_must_fail git diff --no-index "--$STRATEGY" uniq1 uniq2 > output &&\n'
                    span_id: 266
                  ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect output\n' span_id:267) 
                  (Token id:Id.Lit_Chars val:'\t' span_id:268)
                )
              }
            )
          ]
        )
    )
  ]
)