(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) op: Equal rhs: {(SQ <'common tail optimization'>)} ) ] ) (C {(.)} {(./test-lib.sh)}) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:z) op:Equal rhs:{(zzzzzzzz)})] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:z) op: Equal rhs: { (DQ ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ) } ) ] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:z) op: Equal rhs: { (DQ ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ) } ) ] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:z) op: Equal rhs: { (DQ ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ($ VSub_DollarName '$z') ) } ) ] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:z2047) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(expr)} {(DQ ($ VSub_DollarName '$z'))} {(Lit_Other ':')} {(SQ <'.\\(.*\\)'>)} ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:x) op:Equal rhs:{(zzzzzzzzzz)})] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:y) op: Equal rhs: { (DQ ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ($ VSub_DollarName '$x') ) } ) ] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:z) op: Equal rhs: { (DQ ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ($ VSub_DollarName '$y') ) } ) ] ) terminator: <Op_Semi ';'> ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:z1000) op:Equal rhs:{($ VSub_DollarName '$z')})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:z100) op:Equal rhs:{($ VSub_DollarName '$y')})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:z10) op:Equal rhs:{($ VSub_DollarName '$x')})] ) (command.FuncDef name: zs body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:count) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.WhileUntil keyword: <KW_While while> cond: [(C {(test)} {(DQ ($ VSub_DollarName '$count'))} {(-ge)} {(1000)})] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:count) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$count')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1000)}) ) ) } ) ] ) (C {(printf)} {(DQ ('%s'))} {($ VSub_DollarName '$z1000')}) ] ) ) (command.WhileUntil keyword: <KW_While while> cond: [(C {(test)} {(DQ ($ VSub_DollarName '$count'))} {(-ge)} {(100)})] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:count) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$count')}) right: (arith_expr.ArithWord w:{(Lit_Digits 100)}) ) ) } ) ] ) (C {(printf)} {(DQ ('%s'))} {($ VSub_DollarName '$z100')}) ] ) ) (command.WhileUntil keyword: <KW_While while> cond: [(C {(test)} {(DQ ($ VSub_DollarName '$count'))} {(-ge)} {(10)})] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:count) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$count')}) right: (arith_expr.ArithWord w:{(Lit_Digits 10)}) ) ) } ) ] ) (C {(printf)} {(DQ ('%s'))} {($ VSub_DollarName '$z10')}) ] ) ) (command.WhileUntil keyword: <KW_While while> cond: [(C {(test)} {(DQ ($ VSub_DollarName '$count'))} {(-ge)} {(1)})] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:count) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$count')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) (C {(printf)} {(DQ (z))}) ] ) ) ] ) ) (command.FuncDef name: zc body: (command.BraceGroup children: [ (command.Sentence child: (C {(sed)} {(-e)} {(DQ ('/^index/d'))} {(-e)} {(DQ (s/) ($ VSub_DollarName '$z1000') (/Q/g))} {(-e)} {(DQ (s/QQQQQQQQQ/Z9000/g))} {(-e)} {(DQ (s/QQQQQQQQ/Z8000/g))} {(-e)} {(DQ (s/QQQQQQQ/Z7000/g))} {(-e)} {(DQ (s/QQQQQQ/Z6000/g))} {(-e)} {(DQ (s/QQQQQ/Z5000/g))} {(-e)} {(DQ (s/QQQQ/Z4000/g))} {(-e)} {(DQ (s/QQQ/Z3000/g))} {(-e)} {(DQ (s/QQ/Z2000/g))} {(-e)} {(DQ (s/Q/Z1000/g))} {(-e)} {(DQ (s/) ($ VSub_DollarName '$z100') (/Q/g))} {(-e)} {(DQ (s/QQQQQQQQQ/Z900/g))} {(-e)} {(DQ (s/QQQQQQQQ/Z800/g))} {(-e)} {(DQ (s/QQQQQQQ/Z700/g))} {(-e)} {(DQ (s/QQQQQQ/Z600/g))} {(-e)} {(DQ (s/QQQQQ/Z500/g))} {(-e)} {(DQ (s/QQQQ/Z400/g))} {(-e)} {(DQ (s/QQQ/Z300/g))} {(-e)} {(DQ (s/QQ/Z200/g))} {(-e)} {(DQ (s/Q/Z100/g))} {(-e)} {(DQ (s/000Z//g))} {(-e)} {(DQ (s/) ($ VSub_DollarName '$z10') (/Q/g))} {(-e)} {(DQ (s/QQQQQQQQQ/Z90/g))} {(-e)} {(DQ (s/QQQQQQQQ/Z80/g))} {(-e)} {(DQ (s/QQQQQQQ/Z70/g))} {(-e)} {(DQ (s/QQQQQQ/Z60/g))} {(-e)} {(DQ (s/QQQQQ/Z50/g))} {(-e)} {(DQ (s/QQQQ/Z40/g))} {(-e)} {(DQ (s/QQQ/Z30/g))} {(-e)} {(DQ (s/QQ/Z20/g))} {(-e)} {(DQ (s/Q/Z10/g))} {(-e)} {(DQ (s/00Z//g))} {(-e)} {(DQ (s/z/Q/g))} {(-e)} {(DQ (s/QQQQQQQQQ/Z9/g))} {(-e)} {(DQ (s/QQQQQQQQ/Z8/g))} {(-e)} {(DQ (s/QQQQQQQ/Z7/g))} {(-e)} {(DQ (s/QQQQQQ/Z6/g))} {(-e)} {(DQ (s/QQQQQ/Z5/g))} {(-e)} {(DQ (s/QQQQ/Z4/g))} {(-e)} {(DQ (s/QQQ/Z3/g))} {(-e)} {(DQ (s/QQ/Z2/g))} {(-e)} {(DQ (s/Q/Z1/g))} {(-e)} {(DQ (s/0Z//g))} ) terminator: <Op_Semi ';'> ) ] ) ) (command.FuncDef name: expect_pattern body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:cnt) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 774 stdin_parts: [ ('diff --git a/file-a') ($ VSub_DollarName '$cnt') (' b/file-a') ($ VSub_DollarName '$cnt') ('\n') ('--- a/file-a') ($ VSub_DollarName '$cnt') ('\n') ('+++ b/file-a') ($ VSub_DollarName '$cnt') ('\n') ('@@ -1 +1 @@\n') (-Z) (${ VSub_Name cnt) ('a\n') ('+Z') (${ VSub_Name cnt) ('A\n') ('diff --git a/file-b') ($ VSub_DollarName '$cnt') (' b/file-b') ($ VSub_DollarName '$cnt') ('\n') ('--- a/file-b') ($ VSub_DollarName '$cnt') ('\n') ('+++ b/file-b') ($ VSub_DollarName '$cnt') ('\n') ('@@ -1 +1 @@\n') ('-b\n') ('+B\n') ('diff --git a/file-c') ($ VSub_DollarName '$cnt') (' b/file-c') ($ VSub_DollarName '$cnt') ('\n') ('--- a/file-c') ($ VSub_DollarName '$cnt') ('\n') ('+++ b/file-c') ($ VSub_DollarName '$cnt') ('\n') ('@@ -1 +1 @@\n') (-cZ) ($ VSub_DollarName '$cnt') ('\n') (Lit_Other '\\') (' No newline at end of file\n') ('+CZ') ($ VSub_DollarName '$cnt') ('\n') (Lit_Other '\\') (' No newline at end of file\n') ('diff --git a/file-d') ($ VSub_DollarName '$cnt') (' b/file-d') ($ VSub_DollarName '$cnt') ('\n') ('--- a/file-d') ($ VSub_DollarName '$cnt') ('\n') ('+++ b/file-d') ($ VSub_DollarName '$cnt') ('\n') ('@@ -1 +1 @@\n') ('-d\n') ('+D\n') ] ) ] ) ] ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:sample) op: Equal rhs: {(SQ <'1023 1024 1025 2047 4095'>)} ) ] ) (C {(test_expect_success)} {(setup)} { (SQ <'\n'> <'\n'> <'\tfor n in $sample\n'> <'\tdo\n'> <'\t\t( zs $n ; echo a ) >file-a$n &&\n'> <'\t\t( echo b; zs $n; echo ) >file-b$n &&\n'> <'\t\t( printf c; zs $n ) >file-c$n &&\n'> <'\t\t( echo d; zs $n ) >file-d$n &&\n'> <'\n'> <'\t\tgit add file-a$n file-b$n file-c$n file-d$n &&\n'> <'\n'> <'\t\t( zs $n ; echo A ) >file-a$n &&\n'> <'\t\t( echo B; zs $n; echo ) >file-b$n &&\n'> <'\t\t( printf C; zs $n ) >file-c$n &&\n'> <'\t\t( echo D; zs $n ) >file-d$n &&\n'> <'\n'> <'\t\texpect_pattern $n || return 1\n'> <'\n'> <'\tdone >expect\n'> ) } ) (C {(test_expect_success)} {(SQ <'diff -U0'>)} { (SQ <'\n'> <'\n'> <'\tfor n in $sample\n'> <'\tdo\n'> <'\t\tgit diff -U0 file-?$n\n'> <'\tdone | zc >actual &&\n'> <'\ttest_cmp expect actual\n'> <'\n'> ) } ) (C {(test_done)}) ] )