(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'git rev-list --pretty=format test' span_id:13))} spids: [11] ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/lib-terminal.sh)}) (C {(test_tick)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_encoding) op: assign_op.Equal rhs: {(DQ (ISO8859-1))} spids: [34] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:added_utf8_part) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:50) command_list: (command.CommandList children: [(C {(printf)} {(DQ (Id.Lit_Other '\\') (303) (Id.Lit_Other '\\') (274))})] ) ) } spids: [49] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:added_utf8_part_iso88591) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:62) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$added_utf8_part'))}) (C {(iconv)} {(-f)} {(utf-8)} {(-t)} {($ Id.VSub_DollarName '$test_encoding')}) ] negated: F ) ] ) ) } spids: [61] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:added) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:83) command_list: (command.CommandList children: [ (C {(printf)} {(DQ ('added (hinzugef') (${ Id.VSub_Name added_utf8_part) ('gt) foo'))} ) ] ) ) } spids: [82] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:added_iso88591) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:96) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$added'))}) (C {(iconv)} {(-f)} {(utf-8)} {(-t)} {($ Id.VSub_DollarName '$test_encoding')}) ] negated: F ) ] ) ) } spids: [95] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:changed_utf8_part) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:120) command_list: (command.CommandList children: [(C {(printf)} {(DQ (Id.Lit_Other '\\') (303) (Id.Lit_Other '\\') (244))})] ) ) } spids: [119] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:changed_utf8_part_iso88591) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:132) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$changed_utf8_part'))}) (C {(iconv)} {(-f)} {(utf-8)} {(-t)} {($ Id.VSub_DollarName '$test_encoding')}) ] negated: F ) ] ) ) } spids: [131] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:changed) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:153) command_list: (command.CommandList children: [ (C {(printf)} {(DQ ('changed (ge') (${ Id.VSub_Name changed_utf8_part) ('ndert) foo'))} ) ] ) ) } spids: [152] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:changed_iso88591) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:166) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$changed'))}) (C {(iconv)} {(-f)} {(utf-8)} {(-t)} {($ Id.VSub_DollarName '$test_encoding')}) ] negated: F ) ] ) ) } spids: [165] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:truncate_count) op: assign_op.Equal rhs: {(20)} spids: [199] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:setup span_id:206))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:210) (Token id:Id.Lit_Chars val:'\t: >foo &&\n' span_id:211) (Token id:Id.Lit_Chars val:'\tgit add foo &&\n' span_id:212) (Token id: Id.Lit_Chars val: '\tgit config i18n.commitEncoding $test_encoding &&\n' span_id: 213 ) (Token id:Id.Lit_Chars val:'\techo "$added_iso88591" | git commit -F - &&\n' span_id:214) (Token id: Id.Lit_Chars val: '\thead1=$(git rev-parse --verify HEAD) &&\n' span_id: 215 ) (Token id:Id.Lit_Chars val:'\thead1_short=$(git rev-parse --verify --short $head1) &&\n' span_id:216) (Token id: Id.Lit_Chars val: '\ttree1=$(git rev-parse --verify HEAD:) &&\n' span_id: 217 ) (Token id:Id.Lit_Chars val:'\ttree1_short=$(git rev-parse --verify --short $tree1) &&\n' span_id:218) (Token id:Id.Lit_Chars val:'\techo "$changed" > foo &&\n' span_id:219) (Token id:Id.Lit_Chars val:'\techo "$changed_iso88591" | git commit -a -F - &&\n' span_id:220) (Token id: Id.Lit_Chars val: '\thead2=$(git rev-parse --verify HEAD) &&\n' span_id: 221 ) (Token id:Id.Lit_Chars val:'\thead2_short=$(git rev-parse --verify --short $head2) &&\n' span_id:222) (Token id: Id.Lit_Chars val: '\ttree2=$(git rev-parse --verify HEAD:) &&\n' span_id: 223 ) (Token id:Id.Lit_Chars val:'\ttree2_short=$(git rev-parse --verify --short $tree2) &&\n' span_id:224) (Token id: Id.Lit_Chars val: '\tgit config --unset i18n.commitEncoding\n' span_id: 225 ) ) } ) (command.ShFunction name: test_format body: (command.BraceGroup children: [ (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:242) fd: -1 arg_word: {(expect.) ($ Id.VSub_Number '$1')} ) ] ) (C {(test_expect_) (braced_var_sub token: (Token id:Id.VSub_Number val:3 span_id:249) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(success)}) ) } {(DQ ('format ') ($ Id.VSub_Number '$1'))} { (DQ ('\n') ("\t\tgit rev-list --pretty=format:'") ($ Id.VSub_Number '$2') ("' master >output.") ($ Id.VSub_Number '$1') (' &&\n') ('\t\ttest_cmp expect.') ($ Id.VSub_Number '$1') (' output.') ($ Id.VSub_Number '$1') ('\n') ('\t') ) } ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:AUTO_COLOR) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'%C(auto,red)foo%C(auto,reset)' span_id:282))} spids: [280] ) ] ) (command.ShFunction name: has_color body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [ {(printf)} {(SQ (Token id:Id.Lit_Chars val:'\\033[31mfoo\\033[m\\n' span_id:296))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:299) fd: -1 arg_word: {(expect)} ) ] ) (C {(test_cmp)} {(expect)} {(DQ ($ Id.VSub_Number '$1'))}) ] ) ] ) ) (command.ShFunction name: has_no_color body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(echo)} {(foo)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:328) fd: -1 arg_word: {(expect)} ) ] ) (C {(test_cmp)} {(expect)} {(DQ ($ Id.VSub_Number '$1'))}) ] ) ] ) ) (command.Simple words: [{(test_format)} {(percent)} {(Id.Lit_Other '%') (Id.Lit_Other '%') (h)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:353) fd: -1 here_begin: {(EOF)} here_end_span_id: 365 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('%h\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('%h\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(hash)} {(Id.Lit_Other '%') (H) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (h)} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:378) fd: -1 here_begin: {(EOF)} here_end_span_id: 396 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$head2_short') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$head1_short') ('\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(tree)} {(Id.Lit_Other '%') (T) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (t)} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:409) fd: -1 here_begin: {(EOF)} here_end_span_id: 427 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$tree2') ('\n') ($ Id.VSub_DollarName '$tree2_short') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$tree1') ('\n') ($ Id.VSub_DollarName '$tree1_short') ('\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(parents)} {(Id.Lit_Other '%') (P) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (p)} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:440) fd: -1 here_begin: {(EOF)} here_end_span_id: 456 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$head1_short') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('\n') ('\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(author)} {(Id.Lit_Other '%') (an) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (ae) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (ad) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (aD) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (at) } ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:484) fd: -1 here_begin: {(EOF)} here_end_span_id: 504 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('A U Thor\n') ('author@example.com\n') ('Thu Apr 7 15:13:13 2005 -0700\n') ('Thu, 7 Apr 2005 15:13:13 -0700\n') ('1112911993\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('A U Thor\n') ('author@example.com\n') ('Thu Apr 7 15:13:13 2005 -0700\n') ('Thu, 7 Apr 2005 15:13:13 -0700\n') ('1112911993\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(committer)} {(Id.Lit_Other '%') (cn) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (ce) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (cd) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (cD) (Id.Lit_Other '%') (n) (Id.Lit_Other '%') (ct) } ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:529) fd: -1 here_begin: {(EOF)} here_end_span_id: 549 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('C O Mitter\n') ('committer@example.com\n') ('Thu Apr 7 15:13:13 2005 -0700\n') ('Thu, 7 Apr 2005 15:13:13 -0700\n') ('1112911993\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('C O Mitter\n') ('committer@example.com\n') ('Thu Apr 7 15:13:13 2005 -0700\n') ('Thu, 7 Apr 2005 15:13:13 -0700\n') ('1112911993\n') ] ) ] ) (command.Simple words: [{(test_format)} {(encoding)} {(Id.Lit_Other '%') (e)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:558) fd: -1 here_begin: {(EOF)} here_end_span_id: 572 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$test_encoding') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$test_encoding') ('\n') ] ) ] ) (command.Simple words: [{(test_format)} {(subject)} {(Id.Lit_Other '%') (s)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:581) fd: -1 here_begin: {(EOF)} here_end_span_id: 595 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$changed') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$added') ('\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(subject-truncated)} {(DQ ('%<(') ($ Id.VSub_DollarName '$truncate_count') (',trunc)%s'))} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:607) fd: -1 here_begin: {(EOF)} here_end_span_id: 627 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('changed (ge') (${ Id.VSub_Name changed_utf8_part) ('ndert)..\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('added (hinzugef') (${ Id.VSub_Name added_utf8_part) ('gt..\n') ] ) ] ) (command.Simple words: [{(test_format)} {(body)} {(Id.Lit_Other '%') (b)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:636) fd: -1 here_begin: {(EOF)} here_end_span_id: 646 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ] ) ] ) (command.Simple words: [{(test_format)} {(raw-body)} {(Id.Lit_Other '%') (B)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:655) fd: -1 here_begin: {(EOF)} here_end_span_id: 671 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$changed') ('\n') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$added') ('\n') ('\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(colors)} {(Id.Lit_Other '%') (Credfoo) (Id.Lit_Other '%') (Cgreenbar) (Id.Lit_Other '%') (Cbluebaz) (Id.Lit_Other '%') (Cresetxyzzy) } ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:686) fd: -1 here_begin: {(EOF)} here_end_span_id: 698 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('\x1b[31mfoo\x1b[32mbar\x1b[34mbaz\x1b[mxyzzy\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('\x1b[31mfoo\x1b[32mbar\x1b[34mbaz\x1b[mxyzzy\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(advanced-colors)} {(SQ (Token id:Id.Lit_Chars val:'%C(red yellow bold)foo%C(reset)' span_id:705))} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:708) fd: -1 here_begin: {(EOF)} here_end_span_id: 720 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('\x1b[1;31;43mfoo\x1b[m\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('\x1b[1;31;43mfoo\x1b[m\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%C(auto,...) does not enable color by default' span_id:725))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:729) (Token id: Id.Lit_Chars val: '\tgit log --format=$AUTO_COLOR -1 >actual &&\n' span_id: 730 ) (Token id:Id.Lit_Chars val:'\thas_no_color actual\n' span_id:731) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%C(auto,...) enables colors for color.diff' span_id:738))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:742) (Token id: Id.Lit_Chars val: '\tgit -c color.diff=always log --format=$AUTO_COLOR -1 >actual &&\n' span_id: 743 ) (Token id:Id.Lit_Chars val:'\thas_color actual\n' span_id:744) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%C(auto,...) enables colors for color.ui' span_id:751))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:755) (Token id: Id.Lit_Chars val: '\tgit -c color.ui=always log --format=$AUTO_COLOR -1 >actual &&\n' span_id: 756 ) (Token id:Id.Lit_Chars val:'\thas_color actual\n' span_id:757) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%C(auto,...) respects --color' span_id:764))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:768) (Token id: Id.Lit_Chars val: '\tgit log --format=$AUTO_COLOR -1 --color >actual &&\n' span_id: 769 ) (Token id:Id.Lit_Chars val:'\thas_color actual\n' span_id:770) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%C(auto,...) respects --no-color' span_id:777))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:781) (Token id: Id.Lit_Chars val: '\tgit -c color.ui=always log --format=$AUTO_COLOR -1 --no-color >actual &&\n' span_id: 782 ) (Token id:Id.Lit_Chars val:'\thas_no_color actual\n' span_id:783) ) } ) (C {(test_expect_success)} {(TTY)} { (SQ (Token id: Id.Lit_Chars val: '%C(auto,...) respects --color=auto (stdout is tty)' span_id: 792 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:796) (Token id:Id.Lit_Chars val:'\ttest_terminal env TERM=vt100 \\\n' span_id:797) (Token id: Id.Lit_Chars val: '\t\tgit log --format=$AUTO_COLOR -1 --color=auto >actual &&\n' span_id: 798 ) (Token id:Id.Lit_Chars val:'\thas_color actual\n' span_id:799) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '%C(auto,...) respects --color=auto (stdout not tty)' span_id: 806 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:810) (Token id:Id.Lit_Chars val:'\t(\n' span_id:811) (Token id:Id.Lit_Chars val:'\t\tTERM=vt100 && export TERM &&\n' span_id:812) (Token id: Id.Lit_Chars val: '\t\tgit log --format=$AUTO_COLOR -1 --color=auto >actual &&\n' span_id: 813 ) (Token id:Id.Lit_Chars val:'\t\thas_no_color actual\n' span_id:814) (Token id:Id.Lit_Chars val:'\t)\n' span_id:815) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%C(auto) respects --color' span_id:822))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:826) (Token id: Id.Lit_Chars val: '\tgit log --color --format="%C(auto)%H" -1 >actual &&\n' span_id: 827 ) (Token id: Id.Lit_Chars val: '\tprintf "\\\\033[33m%s\\\\033[m\\\\n" $(git rev-parse HEAD) >expect &&\n' span_id: 828 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:829) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%C(auto) respects --no-color' span_id:836))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:840) (Token id: Id.Lit_Chars val: '\tgit log --no-color --format="%C(auto)%H" -1 >actual &&\n' span_id: 841 ) (Token id:Id.Lit_Chars val:'\tgit rev-parse HEAD >expect &&\n' span_id:842) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:843) ) } ) (command.Simple words: [{(iconv)} {(-f)} {(utf-8)} {(-t)} {($ Id.VSub_DollarName '$test_encoding')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:857) fd: -1 arg_word: {(commit-msg)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:861) fd: -1 here_begin: {(EOF)} here_end_span_id: 872 stdin_parts: [ ('Test printing of complex bodies\n') ('\n') ('This commit message is much longer than the others,\n') ('and it will be encoded in ') ($ Id.VSub_DollarName '$test_encoding') ('. We should therefore\n') ('include an ISO8859 character: \xc2\xa1bueno!\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup complex body' span_id:877))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:881) (Token id: Id.Lit_Chars val: '\tgit config i18n.commitencoding $test_encoding &&\n' span_id: 882 ) (Token id:Id.Lit_Chars val:'\techo change2 >foo && git commit -a -F commit-msg &&\n' span_id:883) (Token id: Id.Lit_Chars val: '\thead3=$(git rev-parse --verify HEAD) &&\n' span_id: 884 ) (Token id:Id.Lit_Chars val:'\thead3_short=$(git rev-parse --short $head3)\n' span_id:885) ) } ) (command.Simple words: [{(test_format)} {(complex-encoding)} {(Id.Lit_Other '%') (e)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:896) fd: -1 here_begin: {(EOF)} here_end_span_id: 915 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ($ Id.VSub_DollarName '$test_encoding') ('\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$test_encoding') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$test_encoding') ('\n') ] ) ] ) (command.Simple words: [{(test_format)} {(complex-subject)} {(Id.Lit_Other '%') (s)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:924) fd: -1 here_begin: {(EOF)} here_end_span_id: 942 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ('Test printing of complex bodies\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$changed_iso88591') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$added_iso88591') ('\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(complex-subject-trunc)} {(DQ ('%<(') ($ Id.VSub_DollarName '$truncate_count') (',trunc)%s'))} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:954) fd: -1 here_begin: {(EOF)} here_end_span_id: 978 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ('Test printing of c..\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('changed (ge') (${ Id.VSub_Name changed_utf8_part_iso88591) ('ndert)..\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('added (hinzugef') (${ Id.VSub_Name added_utf8_part_iso88591) ('gt..\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(complex-subject-mtrunc)} {(DQ ('%<(') ($ Id.VSub_DollarName '$truncate_count') (',mtrunc)%s'))} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:990) fd: -1 here_begin: {(EOF)} here_end_span_id: 1010 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ('Test prin..ex bodies\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('changed (..dert) foo\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('added (hi..f') (${ Id.VSub_Name added_utf8_part_iso88591) ('gt) foo\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(complex-subject-ltrunc)} {(DQ ('%<(') ($ Id.VSub_DollarName '$truncate_count') (',ltrunc)%s'))} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1022) fd: -1 here_begin: {(EOF)} here_end_span_id: 1046 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ('.. of complex bodies\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('..ged (ge') (${ Id.VSub_Name changed_utf8_part_iso88591) ('ndert) foo\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('.. (hinzugef') (${ Id.VSub_Name added_utf8_part_iso88591) ('gt) foo\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'prepare expected messages (for test %b)' span_id:1051))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1055) (Token id:Id.Lit_Chars val:'\tcat <<-EOF >expected.utf-8 &&\n' span_id:1056) (Token id:Id.Lit_Chars val:'\tcommit $head3\n' span_id:1057) (Token id: Id.Lit_Chars val: '\tThis commit message is much longer than the others,\n' span_id: 1058 ) (Token id: Id.Lit_Chars val: '\tand it will be encoded in $test_encoding. We should therefore\n' span_id: 1059 ) (Token id:Id.Lit_Chars val:'\tinclude an ISO8859 character: \xc2\xa1bueno!\n' span_id:1060) (Token id:Id.Lit_Chars val:'\n' span_id:1061) (Token id:Id.Lit_Chars val:'\tcommit $head2\n' span_id:1062) (Token id:Id.Lit_Chars val:'\tcommit $head1\n' span_id:1063) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1064) (Token id: Id.Lit_Chars val: '\ticonv -f utf-8 -t $test_encoding expected.utf-8 >expected.ISO8859-1\n' span_id: 1065 ) ) } ) (command.Simple words: [{(test_format)} {(complex-body)} {(Id.Lit_Other '%') (b)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:1076) fd: -1 arg_word: {(expected.ISO8859-1)} ) ] ) (C {(git)} {(config)} {(--unset)} {(i18n.commitEncoding)}) (command.Simple words: [{(test_format)} {(complex-subject-commitencoding-unset)} {(Id.Lit_Other '%') (s)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1102) fd: -1 here_begin: {(EOF)} here_end_span_id: 1120 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ('Test printing of complex bodies\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ($ Id.VSub_DollarName '$changed') ('\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ($ Id.VSub_DollarName '$added') ('\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(complex-subject-commitencoding-unset-trunc)} {(DQ ('%<(') ($ Id.VSub_DollarName '$truncate_count') (',trunc)%s'))} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1132) fd: -1 here_begin: {(EOF)} here_end_span_id: 1156 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ('Test printing of c..\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('changed (ge') (${ Id.VSub_Name changed_utf8_part) ('ndert)..\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('added (hinzugef') (${ Id.VSub_Name added_utf8_part) ('gt..\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(complex-subject-commitencoding-unset-mtrunc)} {(DQ ('%<(') ($ Id.VSub_DollarName '$truncate_count') (',mtrunc)%s'))} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1168) fd: -1 here_begin: {(EOF)} here_end_span_id: 1188 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ('Test prin..ex bodies\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('changed (..dert) foo\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('added (hi..f') (${ Id.VSub_Name added_utf8_part) ('gt) foo\n') ] ) ] ) (command.Simple words: [ {(test_format)} {(complex-subject-commitencoding-unset-ltrunc)} {(DQ ('%<(') ($ Id.VSub_DollarName '$truncate_count') (',ltrunc)%s'))} ] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1200) fd: -1 here_begin: {(EOF)} here_end_span_id: 1224 stdin_parts: [ ('commit ') ($ Id.VSub_DollarName '$head3') ('\n') ('.. of complex bodies\n') ('commit ') ($ Id.VSub_DollarName '$head2') ('\n') ('..ged (ge') (${ Id.VSub_Name changed_utf8_part) ('ndert) foo\n') ('commit ') ($ Id.VSub_DollarName '$head1') ('\n') ('.. (hinzugef') (${ Id.VSub_Name added_utf8_part) ('gt) foo\n') ] ) ] ) (command.Simple words: [{(test_format)} {(complex-body-commitencoding-unset)} {(Id.Lit_Other '%') (b)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:1233) fd: -1 arg_word: {(expected.utf-8)} ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%x00 shows NUL' span_id:1240))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1244) (Token id:Id.Lit_Chars val:'\techo >expect commit $head3 &&\n' span_id:1245) (Token id:Id.Lit_Chars val:'\techo >>expect fooQbar &&\n' span_id:1246) (Token id: Id.Lit_Chars val: '\tgit rev-list -1 --format=foo%x00bar HEAD >actual.nul &&\n' span_id: 1247 ) (Token id:Id.Lit_Chars val:'\tnul_to_q <actual.nul >actual &&\n' span_id:1248) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1249) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%ad respects --date=' span_id:1256))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1260) (Token id: Id.Lit_Chars val: '\techo 2005-04-07 >expect.ad-short &&\n' span_id: 1261 ) (Token id: Id.Lit_Chars val: '\tgit log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&\n' span_id: 1262 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect.ad-short output.ad-short\n' span_id:1263) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'empty email' span_id:1270))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1274) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:1275) (Token id: Id.Lit_Chars val: '\tC=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&\n' span_id: 1276 ) (Token id:Id.Lit_Chars val:'\tA=$(git show --pretty=format:%an,%ae,%ad%n -s $C) &&\n' span_id:1277) (Token id: Id.Lit_Chars val: '\tverbose test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700"\n' span_id: 1278 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'del LF before empty (1)' span_id:1285))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1289) (Token id: Id.Lit_Chars val: '\tgit show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD^^ >actual &&\n' span_id: 1290 ) (Token id:Id.Lit_Chars val:'\ttest_line_count = 2 actual\n' span_id:1291) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'del LF before empty (2)' span_id:1298))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1302) (Token id: Id.Lit_Chars val: '\tgit show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD >actual &&\n' span_id: 1303 ) (Token id:Id.Lit_Chars val:'\ttest_line_count = 6 actual &&\n' span_id:1304) (Token id:Id.Lit_Chars val:'\tgrep "^$" actual\n' span_id:1305) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add LF before non-empty (1)' span_id:1312))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1316) (Token id: Id.Lit_Chars val: '\tgit show -s --pretty=format:"%s%+b%nThanks%n" HEAD^^ >actual &&\n' span_id: 1317 ) (Token id:Id.Lit_Chars val:'\ttest_line_count = 2 actual\n' span_id:1318) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add LF before non-empty (2)' span_id:1325))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1329) (Token id: Id.Lit_Chars val: '\tgit show -s --pretty=format:"%s%+b%nThanks%n" HEAD >actual &&\n' span_id: 1330 ) (Token id:Id.Lit_Chars val:'\ttest_line_count = 6 actual &&\n' span_id:1331) (Token id:Id.Lit_Chars val:'\tgrep "^$" actual\n' span_id:1332) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add SP before non-empty (1)' span_id:1339))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1343) (Token id: Id.Lit_Chars val: '\tgit show -s --pretty=format:"%s% bThanks" HEAD^^ >actual &&\n' span_id: 1344 ) (Token id:Id.Lit_Chars val:'\ttest $(wc -w <actual) = 3\n' span_id:1345) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'add SP before non-empty (2)' span_id:1352))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1356) (Token id: Id.Lit_Chars val: '\tgit show -s --pretty=format:"%s% sThanks" HEAD^^ >actual &&\n' span_id: 1357 ) (Token id:Id.Lit_Chars val:'\ttest $(wc -w <actual) = 6\n' span_id:1358) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:--abbrev span_id:1365))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1369) (Token id:Id.Lit_Chars val:'\techo SHORT SHORT SHORT >expect2 &&\n' span_id:1370) (Token id:Id.Lit_Chars val:'\techo LONG LONG LONG >expect3 &&\n' span_id:1371) (Token id: Id.Lit_Chars val: '\tgit log -1 --format="%h %h %h" HEAD >actual1 &&\n' span_id: 1372 ) (Token id: Id.Lit_Chars val: '\tgit log -1 --abbrev=5 --format="%h %h %h" HEAD >actual2 &&\n' span_id: 1373 ) (Token id: Id.Lit_Chars val: '\tgit log -1 --abbrev=5 --format="%H %H %H" HEAD >actual3 &&\n' span_id: 1374 ) (Token id: Id.Lit_Chars val: '\tsed -e "s/$_x40/LONG/g" -e "s/$_x05/SHORT/g" <actual2 >fuzzy2 &&\n' span_id: 1375 ) (Token id: Id.Lit_Chars val: '\tsed -e "s/$_x40/LONG/g" -e "s/$_x05/SHORT/g" <actual3 >fuzzy3 &&\n' span_id: 1376 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect2 fuzzy2 &&\n' span_id:1377) (Token id:Id.Lit_Chars val:'\ttest_cmp expect3 fuzzy3 &&\n' span_id:1378) (Token id:Id.Lit_Chars val:'\t! test_cmp actual1 actual2\n' span_id:1379) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%H is not affected by --abbrev-commit' span_id:1386))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1390) (Token id: Id.Lit_Chars val: '\tgit log -1 --format=%H --abbrev-commit --abbrev=20 HEAD >actual &&\n' span_id: 1391 ) (Token id:Id.Lit_Chars val:'\tlen=$(wc -c <actual) &&\n' span_id:1392) (Token id:Id.Lit_Chars val:'\ttest $len = 41\n' span_id:1393) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%h is not affected by --abbrev-commit' span_id:1400))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1404) (Token id: Id.Lit_Chars val: '\tgit log -1 --format=%h --abbrev-commit --abbrev=20 HEAD >actual &&\n' span_id: 1405 ) (Token id:Id.Lit_Chars val:'\tlen=$(wc -c <actual) &&\n' span_id:1406) (Token id:Id.Lit_Chars val:'\ttest $len = 21\n' span_id:1407) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'"%h %gD: %gs" is same as git-reflog' span_id:1414))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1418) (Token id:Id.Lit_Chars val:'\tgit reflog >expect &&\n' span_id:1419) (Token id:Id.Lit_Chars val:'\tgit log -g --format="%h %gD: %gs" >actual &&\n' span_id:1420) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1421) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '"%h %gD: %gs" is same as git-reflog (with date)' span_id: 1428 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1432) (Token id:Id.Lit_Chars val:'\tgit reflog --date=raw >expect &&\n' span_id:1433) (Token id: Id.Lit_Chars val: '\tgit log -g --format="%h %gD: %gs" --date=raw >actual &&\n' span_id: 1434 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1435) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '"%h %gD: %gs" is same as git-reflog (with --abbrev)' span_id: 1442 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1446) (Token id: Id.Lit_Chars val: '\tgit reflog --abbrev=13 --date=raw >expect &&\n' span_id: 1447 ) (Token id: Id.Lit_Chars val: '\tgit log -g --abbrev=13 --format="%h %gD: %gs" --date=raw >actual &&\n' span_id: 1448 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1449) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'%gd shortens ref name' span_id:1456))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1460) (Token id: Id.Lit_Chars val: '\techo "master@{0}" >expect.gd-short &&\n' span_id: 1461 ) (Token id: Id.Lit_Chars val: '\tgit log -g -1 --format=%gd refs/heads/master >actual.gd-short &&\n' span_id: 1462 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect.gd-short actual.gd-short\n' span_id:1463) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'reflog identity' span_id:1470))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1474) (Token id: Id.Lit_Chars val: '\techo "C O Mitter:committer@example.com" >expect &&\n' span_id: 1475 ) (Token id:Id.Lit_Chars val:'\tgit log -g -1 --format="%gn:%ge" >actual &&\n' span_id:1476) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1477) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'oneline with empty message' span_id:1484))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1488) (Token id: Id.Lit_Chars val: '\tgit commit -m "dummy" --allow-empty &&\n' span_id: 1489 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "dummy" --allow-empty &&\n' span_id:1490) (Token id: Id.Lit_Chars val: '\tgit filter-branch --msg-filter "sed -e s/dummy//" HEAD^^.. &&\n' span_id: 1491 ) (Token id:Id.Lit_Chars val:'\tgit rev-list --oneline HEAD >test.txt &&\n' span_id:1492) (Token id:Id.Lit_Chars val:'\ttest_line_count = 5 test.txt &&\n' span_id:1493) (Token id:Id.Lit_Chars val:'\tgit rev-list --oneline --graph HEAD >testg.txt &&\n' span_id:1494) (Token id:Id.Lit_Chars val:'\ttest_line_count = 5 testg.txt\n' span_id:1495) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'single-character name is parsed correctly' span_id:1502))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1506) (Token id: Id.Lit_Chars val: '\tgit commit --author="a <a@example.com>" --allow-empty -m foo &&\n' span_id: 1507 ) (Token id:Id.Lit_Chars val:'\techo "a <a@example.com>" >expect &&\n' span_id:1508) (Token id: Id.Lit_Chars val: '\tgit log -1 --format="%an <%ae>" >actual &&\n' span_id: 1509 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1510) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'unused %G placeholders are passed through' span_id:1517))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1521) (Token id:Id.Lit_Chars val:'\techo "%GX %G" >expect &&\n' span_id:1522) (Token id:Id.Lit_Chars val:'\tgit log -1 --format="%GX %G" >actual &&\n' span_id:1523) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1524) ) } ) (C {(test_done)}) ] )