(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'diff --relative tests'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <'\n'> <'\tgit commit --allow-empty -m empty &&\n'> <'\techo content >file1 &&\n'> <'\tmkdir subdir &&\n'> <'\techo other content >subdir/file2 &&\n'> <'\tgit add . &&\n'> <'\tgit commit -m one\n'> ) } ) (FuncDef name: check_diff body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:expect) op: Equal rhs: {($ VSub_Number '$1')} spids: [37] ) ] spids: [37] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(expected)} spids: [45] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('diff --git a/') ($ VSub_Name '$expect') (' b/') ($ VSub_Name '$expect') ('\n') ('new file mode 100644\n') ('index 0000000..25c05ef\n') ('--- /dev/null\n') ('+++ b/') ($ VSub_Name '$expect') ('\n') ('@@ -0,0 +1 @@\n') ('+other content\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [48] ) ] ) (C {(test_expect_success)} {(DQ ('-p ') ($ VSub_Star '$*'))} { (DQ ('\n') ('\tgit diff -p ') ($ VSub_Star '$*') (' HEAD^ >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) ] spids: [35] ) spids: [31 34] ) (FuncDef name: check_numstat body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:expect) op: Equal rhs: {($ VSub_Number '$1')} spids: [89] ) ] spids: [89] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(expected)} spids: [97] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: {(DQ ('1\t0\t') ($ VSub_Name '$expect') ('\n'))} do_expansion: True here_end: EOF was_filled: True spids: [100] ) ] ) (C {(test_expect_success)} {(DQ ('--numstat ') ($ VSub_Star '$*'))} { (DQ ('\n') ("\techo '1\t0\t") ($ VSub_Name '$expect') ("' >expected &&\n") ('\tgit diff --numstat ') ($ VSub_Star '$*') (' HEAD^ >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) ] spids: [87] ) spids: [83 86] ) (FuncDef name: check_stat body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:expect) op: Equal rhs: {($ VSub_Number '$1')} spids: [134] ) ] spids: [134] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(expected)} spids: [142] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ (' ') ($ VSub_Name '$expect') (' | 1 +\n') (' 1 file changed, 1 insertion(+)\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [145] ) ] ) (C {(test_expect_success)} {(DQ ('--stat ') ($ VSub_Star '$*'))} { (DQ ('\n') ('\tgit diff --stat ') ($ VSub_Star '$*') (' HEAD^ >actual &&\n') ('\ttest_i18ncmp expected actual\n') ) } ) ] spids: [132] ) spids: [128 131] ) (FuncDef name: check_raw body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:expect) op: Equal rhs: {($ VSub_Number '$1')} spids: [177] ) ] spids: [177] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(expected)} spids: [185] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ( ':000000 100644 0000000000000000000000000000000000000000 25c05ef3639d2d270e7fe765a67668f098092bc5 A\t' ) ($ VSub_Name '$expect') ('\n') ) } do_expansion: True here_end: EOF was_filled: True spids: [188] ) ] ) (C {(test_expect_success)} {(DQ ('--raw ') ($ VSub_Star '$*'))} { (DQ ('\n') ('\tgit diff --no-abbrev --raw ') ($ VSub_Star '$*') (' HEAD^ >actual &&\n') ('\ttest_cmp expected actual\n') ) } ) ] spids: [175] ) spids: [171 174] ) (ForEach iter_name: type iter_words: [{(diff)} {(numstat)} {(stat)} {(raw)}] do_arg_iter: False body: (DoGroup children: [ (C {(check_) ($ VSub_Name '$type')} {(file2)} {(--relative) (Lit_Other '=') (subdir/)}) (C {(check_) ($ VSub_Name '$type')} {(file2)} {(--relative) (Lit_Other '=') (subdir)}) (C {(check_) ($ VSub_Name '$type')} {(dir/file2)} {(--relative) (Lit_Other '=') (sub)}) ] spids: [228 260] ) spids: [218 226] ) (C {(test_done)}) ] )