(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description spids:[12]) op: Equal rhs: {(SQ <'diff hunk fusing'>)} spids: [12] ) ] spids: [12] ) (C {(.)} {(./test-lib.sh)}) (command.FuncDef name: f body: (command.BraceGroup children: [ (C {(echo)} {($ VSub_Number '$1')}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:i spids:[35]) op: Equal rhs: {(1)} spids: [35] ) ] spids: [35] ) (command.WhileUntil keyword: <KW_While while> cond: [(C {(test)} {($ VSub_Name '$i')} {(-le)} {($ VSub_Number '$2')})] body: (command.DoGroup children: [ (C {(echo)} {($ VSub_Name '$i')}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:i spids:[58]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(expr)} {($ VSub_Name '$i')} {(Lit_Other '+')} {(1)}) ] ) left_token: <Left_CommandSub '$('> spids: [59 67] ) } spids: [58] ) ] spids: [58] ) ] spids: [50 70] ) ) (C {(echo)} {($ VSub_Number '$3')}) ] spids: [27] ) spids: [23 26] ) (command.FuncDef name: t body: (command.BraceGroup children: [ (command.Case to_match: {($ VSub_Pound '$#')} arms: [ (case_arm pat_list: [{(4)}] action: [ (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:hunks spids:[97]) op: Equal rhs: {($ VSub_Number '$4')} spids: [97] ) ] spids: [97] ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cmd spids:[101]) op: Equal rhs: {(DQ ('diff -U') ($ VSub_Number '$3'))} spids: [101] ) ] spids: [101] ) ] spids: [94 95 106 16777215] ) (case_arm pat_list: [{(5)}] action: [ (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:hunks spids:[112]) op: Equal rhs: {($ VSub_Number '$5')} spids: [112] ) ] spids: [112] ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cmd spids:[116]) op: Equal rhs: { (DQ ('diff -U') ($ VSub_Number '$3') (' --inter-hunk-context=') ($ VSub_Number '$4') ) } spids: [116] ) ] spids: [116] ) ] spids: [109 110 123 16777215] ) ] spids: [87 91 126] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:label spids:[129]) op: Equal rhs: { (DQ ($ VSub_Name '$cmd') (', ') ($ VSub_Number '$1') (' common ') ($ VSub_Number '$2') ) } spids: [129] ) ] spids: [129] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:file spids:[139]) op: Equal rhs: {(f) ($ VSub_Number '$1')} spids: [139] ) ] spids: [139] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expected spids:[144]) op: Equal rhs: {(expected.) ($ VSub_Name '$file') (.) ($ VSub_Number '$3') (.) ($ VSub_Name '$hunks') } spids: [144] ) ] spids: [144] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [(C {(test)} {(-f)} {($ VSub_Name '$file')})] negated: T ) ] action: [ (command.SimpleCommand words: [{(f)} {(A)} {($ VSub_Number '$1')} {(B)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Name '$file')} ) ] ) (C {(git)} {(add)} {($ VSub_Name '$file')}) (C {(git)} {(commit)} {(-q)} {(-m.)} {($ VSub_Name '$file')}) (command.SimpleCommand words: [{(f)} {(X)} {($ VSub_Number '$1')} {(Y)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {($ VSub_Name '$file')} ) ] ) ] spids: [16777215 165] ) ] spids: [16777215 210] ) (C {(test_expect_success)} {(DQ ($ VSub_Name '$label') (': count hunks (') ($ VSub_Name '$hunks') (')'))} { (DQ ('\n') ('\t\ttest ') (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(git)} {($ VSub_Name '$cmd')} {($ VSub_Name '$file')}) (C {(grep)} {(SQ <'^@@ '>)}) (C {(wc)} {(-l)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [226 246] ) (' = ') ($ VSub_Name '$hunks') ('\n') ('\t') ) } ) (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-f)} {($ VSub_Name '$expected')}) (C {(test_expect_success)} {(DQ ($ VSub_Name '$label') (': check output'))} { (DQ ('\n') ('\t\tgit ') ($ VSub_Name '$cmd') (' ') ($ VSub_Name '$file') (" | grep -v '^index ' >actual &&\n") ('\t\ttest_cmp ') ($ VSub_Name '$expected') (' actual\n') ('\t') ) } ) ] ) ] spids: [84] ) spids: [80 83] ) (command.AndOr ops: [Op_DPipe] children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 311 stdin_parts: [ ('diff --git a/f1 b/f1\n') ('--- a/f1\n') ('+++ b/f1\n') ('@@ -1,3 +1,3 @@\n') ('-A\n') ('+X\n') (' 1\n') ('-B\n') ('+Y\n') ] ) (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected.f1.0.1)}) ] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) (command.AndOr ops: [Op_DPipe] children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 337 stdin_parts: [ ('diff --git a/f1 b/f1\n') ('--- a/f1\n') ('+++ b/f1\n') ('@@ -1 +1 @@\n') ('-A\n') ('+X\n') ('@@ -3 +3 @@ A\n') ('-B\n') ('+Y\n') ] ) (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected.f1.0.2)}) ] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) (C {(t)} {(1)} {(line)} {(0)} {(2)}) (C {(t)} {(1)} {(line)} {(0)} {(0)} {(2)}) (C {(t)} {(1)} {(line)} {(0)} {(1)} {(1)}) (C {(t)} {(1)} {(line)} {(0)} {(2)} {(1)}) (C {(t)} {(1)} {(line)} {(1)} {(1)}) (C {(t)} {(2)} {(lines)} {(0)} {(2)}) (C {(t)} {(2)} {(lines)} {(0)} {(0)} {(2)}) (C {(t)} {(2)} {(lines)} {(0)} {(1)} {(2)}) (C {(t)} {(2)} {(lines)} {(0)} {(2)} {(1)}) (C {(t)} {(2)} {(lines)} {(1)} {(1)}) (C {(t)} {(3)} {(lines)} {(1)} {(2)}) (C {(t)} {(3)} {(lines)} {(1)} {(0)} {(2)}) (C {(t)} {(3)} {(lines)} {(1)} {(1)} {(1)}) (C {(t)} {(3)} {(lines)} {(1)} {(2)} {(1)}) (C {(t)} {(9)} {(lines)} {(3)} {(2)}) (C {(t)} {(9)} {(lines)} {(3)} {(2)} {(2)}) (C {(t)} {(9)} {(lines)} {(3)} {(3)} {(1)}) (C {(test_done)}) ] )