(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:-1 arg_word:{(expected)} spids:[45]) (HereDoc op_id: Redir_DLess fd: -1 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: [88] ) ] spids: [88] ) terminator: <Op_Semi ";"> ) (C {(shift)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[96]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("1\t0\t") ($ VSub_Name "$expect") ("\n"))} do_expansion: True here_end: EOF was_filled: True spids: [99] ) ] ) (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: [86] ) spids: [82 85] ) (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: [132] ) ] spids: [132] ) terminator: <Op_Semi ";"> ) (C {(shift)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[140]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ (" ") ($ VSub_Name "$expect") (" | 1 +\n") (" 1 file changed, 1 insertion(+)\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [143] ) ] ) (C {(test_expect_success)} {(DQ ("--stat ") ($ VSub_Star "$*"))} { (DQ ("\n") ("\tgit diff --stat ") ($ VSub_Star "$*") (" HEAD^ >actual &&\n") ("\ttest_i18ncmp expected actual\n") ) } ) ] spids: [130] ) spids: [126 129] ) (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: [174] ) ] spids: [174] ) terminator: <Op_Semi ";"> ) (C {(shift)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expected)} spids:[182]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ( ":000000 100644 0000000000000000000000000000000000000000 25c05ef3639d2d270e7fe765a67668f098092bc5 A\t" ) ($ VSub_Name "$expect") ("\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [185] ) ] ) (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: [172] ) spids: [168 171] ) (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: [224 256] ) spids: [214 222] ) (C {(test_done)}) ] )