(CommandList children: [ (FuncDef name: test_diff_frobnitz body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(file1)} spids:[16]) (HereDoc op_id: Redir_DLess fd: -1 body: {('#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') } do_expansion: False here_end: EOF was_filled: True spids: [19] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(file2)} spids:[27]) (HereDoc op_id: Redir_DLess fd: -1 body: {('#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') } do_expansion: False here_end: EOF was_filled: True spids: [30] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[38]) (HereDoc op_id: Redir_DLess fd: -1 body: {('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') } do_expansion: False here_end: EOF was_filled: True spids: [41] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:STRATEGY) op: Equal rhs: {($ VSub_Number '$1')} spids: [47] ) ] spids: [47] ) (C {(test_expect_success)} {(DQ ($ VSub_Name '$STRATEGY') (' diff'))} { (SQ <'\n'> < '\t\ttest_must_fail git diff --no-index "--$STRATEGY" file1 file2 > output &&\n' > <'\t\ttest_cmp expect output\n'> <'\t'> ) } ) (C {(test_expect_success)} {(DQ ($ VSub_Name '$STRATEGY') (' diff output is valid'))} { (SQ <'\n'> <'\t\tmv file2 expect &&\n'> <'\t\tgit apply < output &&\n'> <'\t\ttest_cmp expect file2\n'> <'\t'> ) } ) ] spids: [11] ) spids: [7 10] ) (FuncDef name: test_diff_unique body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(uniq1)} spids:[95]) (HereDoc op_id: Redir_DLess fd: -1 body: {('1\n') ('2\n') ('3\n') ('4\n') ('5\n') ('6\n')} do_expansion: False here_end: EOF was_filled: True spids: [98] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(uniq2)} spids:[106]) (HereDoc op_id: Redir_DLess fd: -1 body: {('a\n') ('b\n') ('c\n') ('d\n') ('e\n') ('f\n')} do_expansion: False here_end: EOF was_filled: True spids: [109] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[117]) (HereDoc op_id: Redir_DLess fd: -1 body: {('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') } do_expansion: False here_end: EOF was_filled: True spids: [120] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:STRATEGY) op: Equal rhs: {($ VSub_Number '$1')} spids: [126] ) ] spids: [126] ) (C {(test_expect_success)} {(SQ <'completely different files'>)} { (SQ <'\n'> < '\t\ttest_must_fail git diff --no-index "--$STRATEGY" uniq1 uniq2 > output &&\n' > <'\t\ttest_cmp expect output\n'> <'\t'> ) } ) ] spids: [90] ) spids: [86 89] ) ] )