(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'diff --relative tests'>)} 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'> ) } ) (command.ShFunction name: check_diff body: (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:expect) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [37] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<expected>} ) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 65 stdin_parts: [ <'diff --git a/'> ($ Id.VSub_DollarName '$expect') <' b/'> ($ Id.VSub_DollarName '$expect') <'\n'> <'new file mode 100644\n'> <'index 0000000..25c05ef\n'> <'--- /dev/null\n'> <'+++ b/'> ($ Id.VSub_DollarName '$expect') <'\n'> <'@@ -0,0 +1 @@\n'> <'+other content\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(DQ <'-p '> ($ Id.VSub_Star '$*'))} { (DQ <'\n'> <'\tgit diff -p '> ($ Id.VSub_Star '$*') <' HEAD^ >actual &&\n'> <'\ttest_cmp expected actual\n'> ) } ) ] ) ) (command.ShFunction name: check_numstat body: (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:expect) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [90] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<expected>} ) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 108 stdin_parts: [<'1\t0\t'> ($ Id.VSub_DollarName '$expect') <'\n'>] ) ) ] do_fork: T ) (C {<test_expect_success>} {(DQ <'--numstat '> ($ Id.VSub_Star '$*'))} { (DQ <'\n'> <'\techo \'1\t0\t'> ($ Id.VSub_DollarName '$expect') <'\' >expected &&\n'> <'\tgit diff --numstat '> ($ Id.VSub_Star '$*') <' HEAD^ >actual &&\n'> <'\ttest_cmp expected actual\n'> ) } ) ] ) ) (command.ShFunction name: check_stat body: (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:expect) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [136] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<expected>} ) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 155 stdin_parts: [ <' '> ($ Id.VSub_DollarName '$expect') <' | 1 +\n'> <' 1 file changed, 1 insertion(+)\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(DQ <'--stat '> ($ Id.VSub_Star '$*'))} { (DQ <'\n'> <'\tgit diff --stat '> ($ Id.VSub_Star '$*') <' HEAD^ >actual &&\n'> <'\ttest_i18ncmp expected actual\n'> ) } ) ] ) ) (command.ShFunction name: check_raw body: (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:expect) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [180] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<expected>} ) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 198 stdin_parts: [ < ':000000 100644 0000000000000000000000000000000000000000 25c05ef3639d2d270e7fe765a67668f098092bc5 A\t' > ($ Id.VSub_DollarName '$expect') <'\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(DQ <'--raw '> ($ Id.VSub_Star '$*'))} { (DQ <'\n'> <'\tgit diff --no-abbrev --raw '> ($ Id.VSub_Star '$*') <' HEAD^ >actual &&\n'> <'\ttest_cmp expected actual\n'> ) } ) ] ) ) (command.ForEach iter_name: type iter_words: [{<diff>} {<numstat>} {<stat>} {<raw>}] do_arg_iter: F body: (command.DoGroup children: [ (C {<check_> ($ Id.VSub_DollarName '$type')} {<file2>} {<--relative> <Id.Lit_Equals '='> <'subdir/'>} ) (C {<check_> ($ Id.VSub_DollarName '$type')} {<file2>} {<--relative> <Id.Lit_Equals '='> <subdir>} ) (C {<check_> ($ Id.VSub_DollarName '$type')} {<'dir/file2'>} {<--relative> <Id.Lit_Equals '='> <sub>} ) ] ) ) (C {<test_done>}) ] )