(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:'Test git config in different settings' span_id:15))} spids: [13] ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clear default config' span_id:27))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:31) (Token id:Id.Lit_Chars val:'\trm -f .git/config\n' span_id:32) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:38) fd:-1 arg_word:{(expect)}) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:42) fd: -1 here_begin: {(EOF)} here_end_span_id: 49 stdin_parts: [('[core]\n') ('\tpenguin = little blue\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:initial span_id:53))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:57) (Token id: Id.Lit_Chars val: '\tgit config core.penguin "little blue" &&\n' span_id: 58 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:59) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:65) fd:-1 arg_word:{(expect)}) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:69) fd: -1 here_begin: {(EOF)} here_end_span_id: 77 stdin_parts: [('[core]\n') ('\tpenguin = little blue\n') ('\tMovie = BadPhysics\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'mixed case' span_id:81))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:85) (Token id:Id.Lit_Chars val:'\tgit config Core.Movie BadPhysics &&\n' span_id:86) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:87) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:93) fd:-1 arg_word:{(expect)}) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:97) fd: -1 here_begin: {(EOF)} here_end_span_id: 107 stdin_parts: [ ('[core]\n') ('\tpenguin = little blue\n') ('\tMovie = BadPhysics\n') ('[Cores]\n') ('\tWhatEver = Second\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'similar section' span_id:111))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:115) (Token id:Id.Lit_Chars val:'\tgit config Cores.WhatEver Second &&\n' span_id:116) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:117) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:123) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:127) fd: -1 here_begin: {(EOF)} here_end_span_id: 138 stdin_parts: [ ('[core]\n') ('\tpenguin = little blue\n') ('\tMovie = BadPhysics\n') ('\tUPPERCASE = true\n') ('[Cores]\n') ('\tWhatEver = Second\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'uppercase section' span_id:142))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:146) (Token id:Id.Lit_Chars val:'\tgit config CORE.UPPERCASE true &&\n' span_id:147) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:148) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'replace with non-match' span_id:155))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:159) (Token id: Id.Lit_Chars val: '\tgit config core.penguin kingpin !blue\n' span_id: 160 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'replace with non-match (actually matching)' span_id:167))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:171) (Token id: Id.Lit_Chars val: '\tgit config core.penguin "very blue" !kingpin\n' span_id: 172 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:178) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:182) fd: -1 here_begin: {(EOF)} here_end_span_id: 194 stdin_parts: [ ('[core]\n') ('\tpenguin = very blue\n') ('\tMovie = BadPhysics\n') ('\tUPPERCASE = true\n') ('\tpenguin = kingpin\n') ('[Cores]\n') ('\tWhatEver = Second\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'non-match result' span_id:199))} {(SQ (Token id:Id.Lit_Chars val:'test_cmp expect .git/config' span_id:203))} ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'find mixed-case key by canonical name' span_id:210))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:214) (Token id:Id.Lit_Chars val:'\techo Second >expect &&\n' span_id:215) (Token id:Id.Lit_Chars val:'\tgit config cores.whatever >actual &&\n' span_id:216) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:217) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'find mixed-case key by non-canonical name' span_id:224))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:228) (Token id:Id.Lit_Chars val:'\techo Second >expect &&\n' span_id:229) (Token id:Id.Lit_Chars val:'\tgit config CoReS.WhAtEvEr >actual &&\n' span_id:230) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:231) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'subsections are not canonicalized by git-config' span_id:238))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:242) (Token id:Id.Lit_Chars val:'\tcat >>.git/config <<-\\EOF &&\n' span_id:243) (Token id:Id.Lit_Chars val:'\t[section.SubSection]\n' span_id:244) (Token id:Id.Lit_Chars val:'\tkey = one\n' span_id:245) (Token id:Id.Lit_Chars val:'\t[section "SubSection"]\n' span_id:246) (Token id:Id.Lit_Chars val:'\tkey = two\n' span_id:247) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:248) (Token id:Id.Lit_Chars val:'\techo one >expect &&\n' span_id:249) (Token id:Id.Lit_Chars val:'\tgit config section.subsection.key >actual &&\n' span_id:250) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:251) (Token id:Id.Lit_Chars val:'\techo two >expect &&\n' span_id:252) (Token id: Id.Lit_Chars val: '\tgit config section.SubSection.key >actual &&\n' span_id: 253 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:254) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:260) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:264) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:265)) (OF) } here_end_span_id: 273 stdin_parts: [('[alpha]\n') ('bar = foo\n') ('[beta]\n') ('baz = multiple \\\n') ('lines\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'unset with cont. lines' span_id:278))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:282) (Token id:Id.Lit_Chars val:'\tgit config --unset beta.baz\n' span_id:283) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:289) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:293) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:294)) (OF) } here_end_span_id: 300 stdin_parts: [('[alpha]\n') ('bar = foo\n') ('[beta]\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'unset with cont. lines is correct' span_id:305))} {(SQ (Token id:Id.Lit_Chars val:'test_cmp expect .git/config' span_id:309))} ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:315) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:319) fd: -1 here_begin: {(EOF)} here_end_span_id: 337 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('\t\thaha =') (Id.Right_DoubleQuote '"') (beta) (Id.Right_DoubleQuote '"') (' # last silly comment\n') ('haha = hello\n') ('\thaha = bello\n') ('[nextSection] noNewline = ouch\n') ] ) ] ) (C {(cp)} {(.git/config)} {(.git/config2)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'multiple unset' span_id:349))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:353) (Token id:Id.Lit_Chars val:'\tgit config --unset-all beta.haha\n' span_id:354) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:360) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:364) fd: -1 here_begin: {(EOF)} here_end_span_id: 375 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('[nextSection] noNewline = ouch\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'multiple unset is correct' span_id:380))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:384) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:385) ) } ) (C {(cp)} {(.git/config2)} {(.git/config)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--replace-all missing value' span_id:399))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:403) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --replace-all beta.haha &&\n' span_id: 404 ) (Token id:Id.Lit_Chars val:'\ttest_cmp .git/config2 .git/config\n' span_id:405) ) } ) (C {(rm)} {(.git/config2)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:--replace-all span_id:417))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:421) (Token id: Id.Lit_Chars val: '\tgit config --replace-all beta.haha gamma\n' span_id: 422 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:428) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:432) fd: -1 here_begin: {(EOF)} here_end_span_id: 444 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('\thaha = gamma\n') ('[nextSection] noNewline = ouch\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'all replaced' span_id:449))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:453) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:454) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:460) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:464) fd: -1 here_begin: {(EOF)} here_end_span_id: 476 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('\thaha = alpha\n') ('[nextSection] noNewline = ouch\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'really mean test' span_id:480))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:484) (Token id:Id.Lit_Chars val:'\tgit config beta.haha alpha &&\n' span_id:485) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:486) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:492) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:496) fd: -1 here_begin: {(EOF)} here_end_span_id: 509 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('\thaha = alpha\n') ('[nextSection]\n') ('\tnonewline = wow\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'really really mean test' span_id:513))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:517) (Token id: Id.Lit_Chars val: '\tgit config nextsection.nonewline wow &&\n' span_id: 518 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:519) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get value' span_id:526))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:530) (Token id:Id.Lit_Chars val:'\techo alpha >expect &&\n' span_id:531) (Token id:Id.Lit_Chars val:'\tgit config beta.haha >actual &&\n' span_id:532) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:533) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:539) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:543) fd: -1 here_begin: {(EOF)} here_end_span_id: 555 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('[nextSection]\n') ('\tnonewline = wow\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:unset span_id:559))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:563) (Token id:Id.Lit_Chars val:'\tgit config --unset beta.haha &&\n' span_id:564) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:565) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:571) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:575) fd: -1 here_begin: {(EOF)} here_end_span_id: 588 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('[nextSection]\n') ('\tnonewline = wow\n') ('\tNoNewLine = wow2 for me\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:multivar span_id:592))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:596) (Token id: Id.Lit_Chars val: '\tgit config nextsection.NoNewLine "wow2 for me" "for me$" &&\n' span_id: 597 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:598) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:non-match span_id:605))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:609) (Token id: Id.Lit_Chars val: '\tgit config --get nextsection.nonewline !for\n' span_id: 610 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'non-match value' span_id:617))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:621) (Token id:Id.Lit_Chars val:'\techo wow >expect &&\n' span_id:622) (Token id:Id.Lit_Chars val:'\tgit config --get nextsection.nonewline !for >actual &&\n' span_id:623) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:624) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'multi-valued get returns final one' span_id:631))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:635) (Token id:Id.Lit_Chars val:'\techo "wow2 for me" >expect &&\n' span_id:636) (Token id:Id.Lit_Chars val:'\tgit config --get nextsection.nonewline >actual &&\n' span_id:637) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:638) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'multi-valued get-all returns all' span_id:645))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:649) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:650) (Token id:Id.Lit_Chars val:'\twow\n' span_id:651) (Token id:Id.Lit_Chars val:'\twow2 for me\n' span_id:652) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:653) (Token id: Id.Lit_Chars val: '\tgit config --get-all nextsection.nonewline >actual &&\n' span_id: 654 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:655) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:661) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:665) fd: -1 here_begin: {(EOF)} here_end_span_id: 678 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('[nextSection]\n') ('\tnonewline = wow3\n') ('\tNoNewLine = wow2 for me\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'multivar replace' span_id:682))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:686) (Token id: Id.Lit_Chars val: '\tgit config nextsection.nonewline "wow3" "wow$" &&\n' span_id: 687 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:688) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'ambiguous unset' span_id:695))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:699) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --unset nextsection.nonewline\n' span_id: 700 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'invalid unset' span_id:707))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:711) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --unset somesection.nonewline\n' span_id: 712 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:718) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:722) fd: -1 here_begin: {(EOF)} here_end_span_id: 734 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('[nextSection]\n') ('\tNoNewLine = wow2 for me\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'multivar unset' span_id:739))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:743) (Token id: Id.Lit_Chars val: '\tgit config --unset nextsection.nonewline "wow3$" &&\n' span_id: 744 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:745) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'invalid key' span_id:752))} {(SQ (Token id:Id.Lit_Chars val:'test_must_fail git config inval.2key blabla' span_id:756))} ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'correct key' span_id:763))} {(SQ (Token id:Id.Lit_Chars val:'git config 123456.a123 987' span_id:767))} ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'hierarchical section' span_id:774))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:778) (Token id: Id.Lit_Chars val: '\tgit config Version.1.2.3eX.Alpha beta\n' span_id: 779 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:785) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:789) fd: -1 here_begin: {(EOF)} here_end_span_id: 809 stdin_parts: [ ('[beta] ; silly comment # another comment\n') ("noIndent= sillyValue ; 'nother silly comment\n") ('\n') ('# empty line\n') ('\t\t; comment\n') ('[nextSection]\n') ('\tNoNewLine = wow2 for me\n') ('[123456]\n') ('\ta123 = 987\n') ('[Version ') (Id.Right_DoubleQuote '"') (1.2.3eX) (Id.Right_DoubleQuote '"') (']\n') ('\tAlpha = beta\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'hierarchical section value' span_id:814))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:818) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:819) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:825) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:829) fd: -1 here_begin: {(EOF)} here_end_span_id: 838 stdin_parts: [ ('beta.noindent=sillyValue\n') ('nextsection.nonewline=wow2 for me\n') ('123456.a123=987\n') ('version.1.2.3eX.alpha=beta\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'working --list' span_id:843))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:847) (Token id:Id.Lit_Chars val:'\tgit config --list > output &&\n' span_id:848) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:849) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:854) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:858) fd: -1 here_begin: {(EOF)} here_end_span_id: 863 ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--list without repo produces empty output' span_id:868))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:872) (Token id: Id.Lit_Chars val: '\tgit --git-dir=nonexistent config --list >output &&\n' span_id: 873 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:874) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:880) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:884) fd: -1 here_begin: {(EOF)} here_end_span_id: 893 stdin_parts: [ ('beta.noindent\n') ('nextsection.nonewline\n') ('123456.a123\n') ('version.1.2.3eX.alpha\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--name-only --list' span_id:898))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:902) (Token id: Id.Lit_Chars val: '\tgit config --name-only --list >output &&\n' span_id: 903 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:904) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:910) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:914) fd: -1 here_begin: {(EOF)} here_end_span_id: 921 stdin_parts: [('beta.noindent sillyValue\n') ('nextsection.nonewline wow2 for me\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:--get-regexp span_id:926))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:930) (Token id: Id.Lit_Chars val: '\tgit config --get-regexp in >output &&\n' span_id: 931 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:932) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:938) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:942) fd: -1 here_begin: {(EOF)} here_end_span_id: 949 stdin_parts: [('beta.noindent\n') ('nextsection.nonewline\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--name-only --get-regexp' span_id:954))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:958) (Token id: Id.Lit_Chars val: '\tgit config --name-only --get-regexp in >output &&\n' span_id: 959 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:960) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:966) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:970) fd: -1 here_begin: {(EOF)} here_end_span_id: 977 stdin_parts: [('wow2 for me\n') ('wow4 for you\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:--add span_id:982))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:986) (Token id: Id.Lit_Chars val: '\tgit config --add nextsection.nonewline "wow4 for you" &&\n' span_id: 987 ) (Token id:Id.Lit_Chars val:'\tgit config --get-all nextsection.nonewline > output &&\n' span_id:988) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:989) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:995) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:999) fd: -1 here_begin: {(EOF)} here_end_span_id: 1008 stdin_parts: [('[novalue]\n') ('\tvariable\n') ('[emptyvalue]\n') ('\tvariable =\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get variable with no value' span_id:1013))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1017) (Token id: Id.Lit_Chars val: '\tgit config --get novalue.variable ^$\n' span_id: 1018 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get variable with empty value' span_id:1025))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1029) (Token id: Id.Lit_Chars val: '\tgit config --get emptyvalue.variable ^$\n' span_id: 1030 ) ) } ) (command.Simple words: [{(echo)} {(novalue.variable)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1038) fd: -1 arg_word: {(expect)} ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get-regexp variable with no value' span_id:1046))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1050) (Token id: Id.Lit_Chars val: '\tgit config --get-regexp novalue > output &&\n' span_id: 1051 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:1052) ) } ) (command.Simple words: [{(echo)} {(SQ (Token id:Id.Lit_Chars val:'novalue.variable true' span_id:1059))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1062) fd: -1 arg_word: {(expect)} ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get-regexp --bool variable with no value' span_id:1070))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1074) (Token id: Id.Lit_Chars val: '\tgit config --bool --get-regexp novalue > output &&\n' span_id: 1075 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:1076) ) } ) (command.Simple words: [{(echo)} {(SQ (Token id:Id.Lit_Chars val:'emptyvalue.variable ' span_id:1083))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1086) fd: -1 arg_word: {(expect)} ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get-regexp variable with empty value' span_id:1094))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1098) (Token id: Id.Lit_Chars val: '\tgit config --get-regexp emptyvalue > output &&\n' span_id: 1099 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:1100) ) } ) (command.Simple words: [{(echo)} {(true)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1108) fd: -1 arg_word: {(expect)} ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get bool variable with no value' span_id:1116))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1120) (Token id: Id.Lit_Chars val: '\tgit config --bool novalue.variable > output &&\n' span_id: 1121 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:1122) ) } ) (command.Simple words: [{(echo)} {(false)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1130) fd: -1 arg_word: {(expect)} ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get bool variable with empty value' span_id:1138))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1142) (Token id: Id.Lit_Chars val: '\tgit config --bool emptyvalue.variable > output &&\n' span_id: 1143 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:1144) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'no arguments, but no crash' span_id:1151))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1155) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config >output 2>&1 &&\n' span_id: 1156 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep usage output\n' span_id:1157) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1163) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1167) fd: -1 here_begin: {(EOF)} here_end_span_id: 1174 stdin_parts: [('[a.b]\n') ('\tc = d\n')] ) ] ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1178) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1182) fd: -1 here_begin: {(EOF)} here_end_span_id: 1191 stdin_parts: [('[a.b]\n') ('\tc = d\n') ('[a]\n') ('\tx = y\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'new section is partial match of another' span_id:1196))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1200) (Token id:Id.Lit_Chars val:'\tgit config a.x y &&\n' span_id:1201) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1202) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1208) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1212) fd: -1 here_begin: {(EOF)} here_end_span_id: 1224 stdin_parts: [ ('[a.b]\n') ('\tc = d\n') ('[a]\n') ('\tx = y\n') ('\tb = c\n') ('[b]\n') ('\tx = y\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'new variable inserts into proper section' span_id:1229))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1233) (Token id:Id.Lit_Chars val:'\tgit config b.x y &&\n' span_id:1234) (Token id:Id.Lit_Chars val:'\tgit config a.b c &&\n' span_id:1235) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1236) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'alternative --file (non-existing file should fail)' span_id: 1243 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1247) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --file non-existing-config -l\n' span_id: 1248 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1254) fd: -1 arg_word: {(other-config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1258) fd: -1 here_begin: {(EOF)} here_end_span_id: 1265 stdin_parts: [('[ein]\n') ('\tbahn = strasse\n')] ) ] ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1269) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1273) fd: -1 here_begin: {(EOF)} here_end_span_id: 1279 stdin_parts: [('ein.bahn=strasse\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'alternative GIT_CONFIG' span_id:1284))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1288) (Token id: Id.Lit_Chars val: '\tGIT_CONFIG=other-config git config --list >output &&\n' span_id: 1289 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:1290) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'alternative GIT_CONFIG (--file)' span_id:1297))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1301) (Token id: Id.Lit_Chars val: '\tgit config --file other-config --list >output &&\n' span_id: 1302 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:1303) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'alternative GIT_CONFIG (--file=-)' span_id:1310))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1314) (Token id: Id.Lit_Chars val: '\tgit config --file - --list <other-config >output &&\n' span_id: 1315 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:1316) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setting a value in stdin is an error' span_id:1323))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1327) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --file - some.value foo\n' span_id: 1328 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'editing stdin is an error' span_id:1335))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1339) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --file - --edit\n' span_id: 1340 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'refer config from subdirectory' span_id:1347))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1351) (Token id:Id.Lit_Chars val:'\tmkdir x &&\n' span_id:1352) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1353) (Token id:Id.Lit_Chars val:'\t\tcd x &&\n' span_id:1354) (Token id:Id.Lit_Chars val:'\t\techo strasse >expect &&\n' span_id:1355) (Token id: Id.Lit_Chars val: '\t\tgit config --get --file ../other-config ein.bahn >actual &&\n' span_id: 1356 ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect actual\n' span_id:1357) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1358) (Token id:Id.Lit_Chars val:'\n' span_id:1359) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'refer config from subdirectory via --file' span_id:1366))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1370) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1371) (Token id:Id.Lit_Chars val:'\t\tcd x &&\n' span_id:1372) (Token id: Id.Lit_Chars val: '\t\tgit config --file=../other-config --get ein.bahn >actual &&\n' span_id: 1373 ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect actual\n' span_id:1374) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1375) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1381) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1385) fd: -1 here_begin: {(EOF)} here_end_span_id: 1394 stdin_parts: [('[ein]\n') ('\tbahn = strasse\n') ('[anwohner]\n') ('\tpark = ausweis\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--set in alternative file' span_id:1399))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1403) (Token id: Id.Lit_Chars val: '\tgit config --file=other-config anwohner.park ausweis &&\n' span_id: 1404 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect other-config\n' span_id:1405) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1411) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1415) fd: -1 here_begin: {(EOF)} here_end_span_id: 1436 stdin_parts: [ ('# Hallo\n') ('\t#Bello\n') ('[branch ') (Id.Right_DoubleQuote '"') (eins) (Id.Right_DoubleQuote '"') (']\n') ('\tx = 1\n') ('[branch.eins]\n') ('\ty = 1\n') ('\t[branch ') (Id.Right_DoubleQuote '"') ('1 234 blabl/a') (Id.Right_DoubleQuote '"') (']\n') ('weird\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename section' span_id:1441))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1445) (Token id: Id.Lit_Chars val: '\tgit config --rename-section branch.eins branch.zwei\n' span_id: 1446 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1452) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1456) fd: -1 here_begin: {(EOF)} here_end_span_id: 1481 stdin_parts: [ ('# Hallo\n') ('\t#Bello\n') ('[branch ') (Id.Right_DoubleQuote '"') (zwei) (Id.Right_DoubleQuote '"') (']\n') ('\tx = 1\n') ('[branch ') (Id.Right_DoubleQuote '"') (zwei) (Id.Right_DoubleQuote '"') (']\n') ('\ty = 1\n') ('\t[branch ') (Id.Right_DoubleQuote '"') ('1 234 blabl/a') (Id.Right_DoubleQuote '"') (']\n') ('weird\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename succeeded' span_id:1486))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1490) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1491) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename non-existing section' span_id:1498))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1502) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --rename-section \\\n' span_id: 1503 ) (Token id:Id.Lit_Chars val:'\t\tbranch."world domination" branch.drei\n' span_id:1504) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename succeeded' span_id:1511))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1515) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1516) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename another section' span_id:1523))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1527) (Token id: Id.Lit_Chars val: '\tgit config --rename-section branch."1 234 blabl/a" branch.drei\n' span_id: 1528 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1534) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1538) fd: -1 here_begin: {(EOF)} here_end_span_id: 1563 stdin_parts: [ ('# Hallo\n') ('\t#Bello\n') ('[branch ') (Id.Right_DoubleQuote '"') (zwei) (Id.Right_DoubleQuote '"') (']\n') ('\tx = 1\n') ('[branch ') (Id.Right_DoubleQuote '"') (zwei) (Id.Right_DoubleQuote '"') (']\n') ('\ty = 1\n') ('[branch ') (Id.Right_DoubleQuote '"') (drei) (Id.Right_DoubleQuote '"') (']\n') ('weird\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename succeeded' span_id:1568))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1572) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1573) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:1579) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1583) fd: -1 here_begin: {(EOF)} here_end_span_id: 1593 stdin_parts: [ ('[branch ') (Id.Right_DoubleQuote '"') (vier) (Id.Right_DoubleQuote '"') ('] z = 1\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename a section with a var on the same line' span_id:1598))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1602) (Token id: Id.Lit_Chars val: '\tgit config --rename-section branch.vier branch.zwei\n' span_id: 1603 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1609) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1613) fd: -1 here_begin: {(EOF)} here_end_span_id: 1644 stdin_parts: [ ('# Hallo\n') ('\t#Bello\n') ('[branch ') (Id.Right_DoubleQuote '"') (zwei) (Id.Right_DoubleQuote '"') (']\n') ('\tx = 1\n') ('[branch ') (Id.Right_DoubleQuote '"') (zwei) (Id.Right_DoubleQuote '"') (']\n') ('\ty = 1\n') ('[branch ') (Id.Right_DoubleQuote '"') (drei) (Id.Right_DoubleQuote '"') (']\n') ('weird\n') ('[branch ') (Id.Right_DoubleQuote '"') (zwei) (Id.Right_DoubleQuote '"') (']\n') ('\tz = 1\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rename succeeded' span_id:1649))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1653) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1654) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'renaming empty section name is rejected' span_id:1661))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1665) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --rename-section branch.zwei ""\n' span_id: 1666 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'renaming to bogus section is rejected' span_id:1673))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1677) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --rename-section branch.zwei "bogus name"\n' span_id: 1678 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:1684) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1688) fd: -1 here_begin: {(EOF)} here_end_span_id: 1702 stdin_parts: [ (' [branch ') (Id.Right_DoubleQuote '"') (zwei) (Id.Right_DoubleQuote '"') ('] a = 1 [branch ') (Id.Right_DoubleQuote '"') (vier) (Id.Right_DoubleQuote '"') (']\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'remove section' span_id:1707))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1711) (Token id: Id.Lit_Chars val: '\tgit config --remove-section branch.zwei\n' span_id: 1712 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1718) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1722) fd: -1 here_begin: {(EOF)} here_end_span_id: 1735 stdin_parts: [ ('# Hallo\n') ('\t#Bello\n') ('[branch ') (Id.Right_DoubleQuote '"') (drei) (Id.Right_DoubleQuote '"') (']\n') ('weird\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'section was removed properly' span_id:1740))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1744) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1745) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1751) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1755) fd: -1 here_begin: {(EOF)} here_end_span_id: 1769 stdin_parts: [ ('[gitcvs]\n') ('\tenabled = true\n') ('\tdbname = %Ggitcvs2.%a.%m.sqlite\n') ('[gitcvs ') (Id.Right_DoubleQuote '"') (ext) (Id.Right_DoubleQuote '"') (']\n') ('\tdbname = %Ggitcvs1.%a.%m.sqlite\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'section ending' span_id:1774))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1778) (Token id:Id.Lit_Chars val:'\trm -f .git/config &&\n' span_id:1779) (Token id:Id.Lit_Chars val:'\tgit config gitcvs.enabled true &&\n' span_id:1780) (Token id: Id.Lit_Chars val: '\tgit config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&\n' span_id: 1781 ) (Token id:Id.Lit_Chars val:'\tgit config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&\n' span_id:1782) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1783) (Token id:Id.Lit_Chars val:'\n' span_id:1784) ) } ) (C {(test_expect_success)} {(numbers)} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1793) (Token id:Id.Lit_Chars val:'\tgit config kilo.gram 1k &&\n' span_id:1794) (Token id:Id.Lit_Chars val:'\tgit config mega.ton 1m &&\n' span_id:1795) (Token id:Id.Lit_Chars val:'\techo 1024 >expect &&\n' span_id:1796) (Token id:Id.Lit_Chars val:'\techo 1048576 >>expect &&\n' span_id:1797) (Token id: Id.Lit_Chars val: '\tgit config --int --get kilo.gram >actual &&\n' span_id: 1798 ) (Token id:Id.Lit_Chars val:'\tgit config --int --get mega.ton >>actual &&\n' span_id:1799) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1800) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--int is at least 64 bits' span_id:1807))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1811) (Token id:Id.Lit_Chars val:'\tgit config giga.watts 121g &&\n' span_id:1812) (Token id:Id.Lit_Chars val:'\techo 129922760704 >expect &&\n' span_id:1813) (Token id: Id.Lit_Chars val: '\tgit config --int --get giga.watts >actual &&\n' span_id: 1814 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:1815) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'invalid unit' span_id:1822))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1826) (Token id: Id.Lit_Chars val: '\tgit config aninvalid.unit "1auto" &&\n' span_id: 1827 ) (Token id:Id.Lit_Chars val:'\techo 1auto >expect &&\n' span_id:1828) (Token id: Id.Lit_Chars val: '\tgit config aninvalid.unit >actual &&\n' span_id: 1829 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:1830) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --int --get aninvalid.unit 2>actual &&\n' span_id: 1831 ) (Token id: Id.Lit_Chars val: '\ttest_i18ngrep "bad numeric config value .1auto. for .aninvalid.unit. in file .git/config: invalid unit" actual\n' span_id: 1832 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'invalid stdin config' span_id:1839))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1843) (Token id: Id.Lit_Chars val: '\techo "[broken" | test_must_fail git config --list --file - >output 2>&1 &&\n' span_id: 1844 ) (Token id: Id.Lit_Chars val: '\ttest_i18ngrep "bad config line 1 in standard input" output\n' span_id: 1845 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1851) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1855) fd: -1 here_begin: {(EOF)} here_end_span_id: 1868 stdin_parts: [ ('true\n') ('false\n') ('true\n') ('false\n') ('true\n') ('false\n') ('true\n') ('false\n') ] ) ] ) (C {(test_expect_success)} {(bool)} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1875) (Token id:Id.Lit_Chars val:'\n' span_id:1876) (Token id:Id.Lit_Chars val:'\tgit config bool.true1 01 &&\n' span_id:1877) (Token id:Id.Lit_Chars val:'\tgit config bool.true2 -1 &&\n' span_id:1878) (Token id:Id.Lit_Chars val:'\tgit config bool.true3 YeS &&\n' span_id:1879) (Token id:Id.Lit_Chars val:'\tgit config bool.true4 true &&\n' span_id:1880) (Token id:Id.Lit_Chars val:'\tgit config bool.false1 000 &&\n' span_id:1881) (Token id:Id.Lit_Chars val:'\tgit config bool.false2 "" &&\n' span_id:1882) (Token id:Id.Lit_Chars val:'\tgit config bool.false3 nO &&\n' span_id:1883) (Token id:Id.Lit_Chars val:'\tgit config bool.false4 FALSE &&\n' span_id:1884) (Token id:Id.Lit_Chars val:'\trm -f result &&\n' span_id:1885) (Token id:Id.Lit_Chars val:'\tfor i in 1 2 3 4\n' span_id:1886) (Token id:Id.Lit_Chars val:'\tdo\n' span_id:1887) (Token id: Id.Lit_Chars val: '\t git config --bool --get bool.true$i >>result\n' span_id: 1888 ) (Token id:Id.Lit_Chars val:'\t git config --bool --get bool.false$i >>result\n' span_id:1889) (Token id:Id.Lit_Chars val:' done &&\n' span_id:1890) (Token id:Id.Lit_Chars val:'\ttest_cmp expect result' span_id:1891) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'invalid bool (--get)' span_id:1898))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1902) (Token id:Id.Lit_Chars val:'\n' span_id:1903) (Token id:Id.Lit_Chars val:'\tgit config bool.nobool foobar &&\n' span_id:1904) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --bool --get bool.nobool' span_id: 1905 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'invalid bool (set)' span_id:1912))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1916) (Token id:Id.Lit_Chars val:'\n' span_id:1917) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config --bool bool.nobool foobar' span_id:1918) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1924) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1928) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1929)) (OF) } here_end_span_id: 1941 stdin_parts: [ ('[bool]\n') ('\ttrue1 = true\n') ('\ttrue2 = true\n') ('\ttrue3 = true\n') ('\ttrue4 = true\n') ('\tfalse1 = false\n') ('\tfalse2 = false\n') ('\tfalse3 = false\n') ('\tfalse4 = false\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set --bool' span_id:1946))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1950) (Token id:Id.Lit_Chars val:'\n' span_id:1951) (Token id:Id.Lit_Chars val:'\trm -f .git/config &&\n' span_id:1952) (Token id:Id.Lit_Chars val:'\tgit config --bool bool.true1 01 &&\n' span_id:1953) (Token id:Id.Lit_Chars val:'\tgit config --bool bool.true2 -1 &&\n' span_id:1954) (Token id: Id.Lit_Chars val: '\tgit config --bool bool.true3 YeS &&\n' span_id: 1955 ) (Token id:Id.Lit_Chars val:'\tgit config --bool bool.true4 true &&\n' span_id:1956) (Token id: Id.Lit_Chars val: '\tgit config --bool bool.false1 000 &&\n' span_id: 1957 ) (Token id:Id.Lit_Chars val:'\tgit config --bool bool.false2 "" &&\n' span_id:1958) (Token id: Id.Lit_Chars val: '\tgit config --bool bool.false3 nO &&\n' span_id: 1959 ) (Token id:Id.Lit_Chars val:'\tgit config --bool bool.false4 FALSE &&\n' span_id:1960) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config' span_id:1961) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1967) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1971) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:1972)) (OF) } here_end_span_id: 1979 stdin_parts: [('[int]\n') ('\tval1 = 1\n') ('\tval2 = -1\n') ('\tval3 = 5242880\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set --int' span_id:1984))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1988) (Token id:Id.Lit_Chars val:'\n' span_id:1989) (Token id:Id.Lit_Chars val:'\trm -f .git/config &&\n' span_id:1990) (Token id:Id.Lit_Chars val:'\tgit config --int int.val1 01 &&\n' span_id:1991) (Token id:Id.Lit_Chars val:'\tgit config --int int.val2 -1 &&\n' span_id:1992) (Token id:Id.Lit_Chars val:'\tgit config --int int.val3 5m &&\n' span_id:1993) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:1994) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get --bool-or-int' span_id:2001))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2005) (Token id:Id.Lit_Chars val:'\tcat >.git/config <<-\\EOF &&\n' span_id:2006) (Token id:Id.Lit_Chars val:'\t[bool]\n' span_id:2007) (Token id:Id.Lit_Chars val:'\ttrue1\n' span_id:2008) (Token id:Id.Lit_Chars val:'\ttrue2 = true\n' span_id:2009) (Token id:Id.Lit_Chars val:'\tfalse = false\n' span_id:2010) (Token id:Id.Lit_Chars val:'\t[int]\n' span_id:2011) (Token id:Id.Lit_Chars val:'\tint1 = 0\n' span_id:2012) (Token id:Id.Lit_Chars val:'\tint2 = 1\n' span_id:2013) (Token id:Id.Lit_Chars val:'\tint3 = -1\n' span_id:2014) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2015) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:2016) (Token id:Id.Lit_Chars val:'\ttrue\n' span_id:2017) (Token id:Id.Lit_Chars val:'\ttrue\n' span_id:2018) (Token id:Id.Lit_Chars val:'\tfalse\n' span_id:2019) (Token id:Id.Lit_Chars val:'\t0\n' span_id:2020) (Token id:Id.Lit_Chars val:'\t1\n' span_id:2021) (Token id:Id.Lit_Chars val:'\t-1\n' span_id:2022) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2023) (Token id:Id.Lit_Chars val:'\t{\n' span_id:2024) (Token id:Id.Lit_Chars val:'\t\tgit config --bool-or-int bool.true1 &&\n' span_id:2025) (Token id: Id.Lit_Chars val: '\t\tgit config --bool-or-int bool.true2 &&\n' span_id: 2026 ) (Token id:Id.Lit_Chars val:'\t\tgit config --bool-or-int bool.false &&\n' span_id:2027) (Token id: Id.Lit_Chars val: '\t\tgit config --bool-or-int int.int1 &&\n' span_id: 2028 ) (Token id:Id.Lit_Chars val:'\t\tgit config --bool-or-int int.int2 &&\n' span_id:2029) (Token id: Id.Lit_Chars val: '\t\tgit config --bool-or-int int.int3\n' span_id: 2030 ) (Token id:Id.Lit_Chars val:'\t} >actual &&\n' span_id:2031) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2032) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2038) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2041) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:2042)) (OF) } here_end_span_id: 2054 stdin_parts: [ ('[bool]\n') ('\ttrue1 = true\n') ('\tfalse1 = false\n') ('\ttrue2 = true\n') ('\tfalse2 = false\n') ('[int]\n') ('\tint1 = 0\n') ('\tint2 = 1\n') ('\tint3 = -1\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set --bool-or-int' span_id:2059))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2063) (Token id:Id.Lit_Chars val:'\trm -f .git/config &&\n' span_id:2064) (Token id:Id.Lit_Chars val:'\tgit config --bool-or-int bool.true1 true &&\n' span_id:2065) (Token id: Id.Lit_Chars val: '\tgit config --bool-or-int bool.false1 false &&\n' span_id: 2066 ) (Token id:Id.Lit_Chars val:'\tgit config --bool-or-int bool.true2 yes &&\n' span_id:2067) (Token id: Id.Lit_Chars val: '\tgit config --bool-or-int bool.false2 no &&\n' span_id: 2068 ) (Token id:Id.Lit_Chars val:'\tgit config --bool-or-int int.int1 0 &&\n' span_id:2069) (Token id: Id.Lit_Chars val: '\tgit config --bool-or-int int.int2 1 &&\n' span_id: 2070 ) (Token id:Id.Lit_Chars val:'\tgit config --bool-or-int int.int3 -1 &&\n' span_id:2071) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:2072) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2078) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2081) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:2082)) (OF) } here_end_span_id: 2089 stdin_parts: [ ('[path]\n') ('\thome = ~/\n') ('\tnormal = /dev/null\n') ('\ttrailingtilde = foo~\n') ] ) ] ) (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} {(SQ (Token id:Id.Lit_Chars val:'set --path' span_id:2097))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2101) (Token id:Id.Lit_Chars val:'\trm -f .git/config &&\n' span_id:2102) (Token id:Id.Lit_Chars val:'\tgit config --path path.home "~/" &&\n' span_id:2103) (Token id: Id.Lit_Chars val: '\tgit config --path path.normal "/dev/null" &&\n' span_id: 2104 ) (Token id:Id.Lit_Chars val:'\tgit config --path path.trailingtilde "foo~" &&\n' span_id:2105) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config' span_id:2106) ) } ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test_have_prereq)} {(Id.KW_Bang '!') (MINGW)}) (C {(test)} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:HOME span_id:2123) suffix_op: (suffix_op.Unary op_id:Id.VTest_Plus arg_word:{(set)}) ) ) } ) ] ) ] action: [(C {(test_set_prereq)} {(HOMEVAR)})] spids: [2110 2129] ) ] ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2141) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2144) fd: -1 here_begin: {(EOF)} here_end_span_id: 2152 stdin_parts: [($ Id.VSub_DollarName '$HOME') ('/\n') ('/dev/null\n') ('foo~\n')] ) ] ) (C {(test_expect_success)} {(HOMEVAR)} {(SQ (Token id:Id.Lit_Chars val:'get --path' span_id:2159))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2163) (Token id: Id.Lit_Chars val: '\tgit config --get --path path.home > result &&\n' span_id: 2164 ) (Token id:Id.Lit_Chars val:'\tgit config --get --path path.normal >> result &&\n' span_id:2165) (Token id: Id.Lit_Chars val: '\tgit config --get --path path.trailingtilde >> result &&\n' span_id: 2166 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect result\n' span_id:2167) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2173) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2176) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:2177)) (OF) } here_end_span_id: 2182 stdin_parts: [('/dev/null\n') ('foo~\n')] ) ] ) (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} {(SQ (Token id:Id.Lit_Chars val:'get --path copes with unset $HOME' span_id:2190))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2194) (Token id:Id.Lit_Chars val:'\t(\n' span_id:2195) (Token id:Id.Lit_Chars val:'\t\tunset HOME;\n' span_id:2196) (Token id: Id.Lit_Chars val: '\t\ttest_must_fail git config --get --path path.home \\\n' span_id: 2197 ) (Token id:Id.Lit_Chars val:'\t\t\t>result 2>msg &&\n' span_id:2198) (Token id: Id.Lit_Chars val: '\t\tgit config --get --path path.normal >>result &&\n' span_id: 2199 ) (Token id:Id.Lit_Chars val:'\t\tgit config --get --path path.trailingtilde >>result\n' span_id:2200) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:2201) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep "[Ff]ailed to expand.*~/" msg &&\n' span_id:2202) (Token id:Id.Lit_Chars val:'\ttest_cmp expect result\n' span_id:2203) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'get --path barfs on boolean variable' span_id:2210))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2214) (Token id:Id.Lit_Chars val:'\techo "[path]bool" >.git/config &&\n' span_id:2215) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config --get --path path.bool\n' span_id:2216) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2222) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2226) fd: -1 here_begin: {(EOF)} here_end_span_id: 2252 stdin_parts: [ ('[quote]\n') ('\tleading = ') (Id.Right_DoubleQuote '"') (' test') (Id.Right_DoubleQuote '"') ('\n') ('\tending = ') (Id.Right_DoubleQuote '"') ('test ') (Id.Right_DoubleQuote '"') ('\n') ('\tsemicolon = ') (Id.Right_DoubleQuote '"') ('test;test') (Id.Right_DoubleQuote '"') ('\n') ('\thash = ') (Id.Right_DoubleQuote '"') ('test#test') (Id.Right_DoubleQuote '"') ('\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:quoting span_id:2256))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2260) (Token id:Id.Lit_Chars val:'\trm -f .git/config &&\n' span_id:2261) (Token id:Id.Lit_Chars val:'\tgit config quote.leading " test" &&\n' span_id:2262) (Token id:Id.Lit_Chars val:'\tgit config quote.ending "test " &&\n' span_id:2263) (Token id:Id.Lit_Chars val:'\tgit config quote.semicolon "test;test" &&\n' span_id:2264) (Token id: Id.Lit_Chars val: '\tgit config quote.hash "test#test" &&\n' span_id: 2265 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:2266) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'key with newline' span_id:2273))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2277) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config "key.with\n' span_id: 2278 ) (Token id:Id.Lit_Chars val:'newline" 123' span_id:2279) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'value with newline' span_id:2286))} { (SQ (Token id:Id.Lit_Chars val:'git config key.sub value.with\\\\\\\n' span_id:2290) (Token id:Id.Lit_Chars val:newline span_id:2291) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2297) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2301) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:2302)) (OF) } here_end_span_id: 2312 stdin_parts: [ ('[section]\n') ('\t; comment \\\n') ('\tcontinued = cont\\\n') ('inued\n') ('\tnoncont = not continued ; \\\n') ('\tquotecont = "cont;\\\n') ('inued"\n') ] ) ] ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2316) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2320) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:2321)) (OF) } here_end_span_id: 2327 stdin_parts: [ ('section.continued=continued\n') ('section.noncont=not continued\n') ('section.quotecont=cont;inued\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'value continued on next line' span_id:2332))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2336) (Token id:Id.Lit_Chars val:'\tgit config --list > result &&\n' span_id:2337) (Token id:Id.Lit_Chars val:'\ttest_cmp result expect\n' span_id:2338) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2344) fd: -1 arg_word: {(.git/config)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2348) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:2349)) (OF) } here_end_span_id: 2358 stdin_parts: [ ('[section "sub=section"]\n') ('\tval1 = foo=bar\n') ('\tval2 = foo\\nbar\n') ('\tval3 = \\n\\n\n') ('\tval4 =\n') ('\tval5\n') ] ) ] ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:2362) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:2366) fd: -1 here_begin: {(word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\E' span_id:2367)) (OF) } here_end_span_id: 2378 stdin_parts: [ ('section.sub=section.val1\n') ('foo=barQsection.sub=section.val2\n') ('foo\n') ('barQsection.sub=section.val3\n') ('\n') ('\n') ('Qsection.sub=section.val4\n') ('Qsection.sub=section.val5Q\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--null --list' span_id:2382))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2386) (Token id: Id.Lit_Chars val: '\tgit config --null --list >result.raw &&\n' span_id: 2387 ) (Token id:Id.Lit_Chars val:'\tnul_to_q <result.raw >result &&\n' span_id:2388) (Token id:Id.Lit_Chars val:'\techo >>result &&\n' span_id:2389) (Token id:Id.Lit_Chars val:'\ttest_cmp expect result\n' span_id:2390) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--null --get-regexp' span_id:2397))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2401) (Token id: Id.Lit_Chars val: '\tgit config --null --get-regexp "val[0-9]" >result.raw &&\n' span_id: 2402 ) (Token id:Id.Lit_Chars val:'\tnul_to_q <result.raw >result &&\n' span_id:2403) (Token id:Id.Lit_Chars val:'\techo >>result &&\n' span_id:2404) (Token id:Id.Lit_Chars val:'\ttest_cmp expect result\n' span_id:2405) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'inner whitespace kept verbatim' span_id:2412))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2416) (Token id: Id.Lit_Chars val: '\tgit config section.val "foo \t bar" &&\n' span_id: 2417 ) (Token id:Id.Lit_Chars val:'\techo "foo \t bar" >expect &&\n' span_id:2418) (Token id:Id.Lit_Chars val:'\tgit config section.val >actual &&\n' span_id:2419) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2420) ) } ) (C {(test_expect_success)} {(SYMLINKS)} {(SQ (Token id:Id.Lit_Chars val:'symlinked configuration' span_id:2429))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2433) (Token id:Id.Lit_Chars val:'\tln -s notyet myconfig &&\n' span_id:2434) (Token id:Id.Lit_Chars val:'\tgit config --file=myconfig test.frotz nitfol &&\n' span_id:2435) (Token id:Id.Lit_Chars val:'\ttest -h myconfig &&\n' span_id:2436) (Token id:Id.Lit_Chars val:'\ttest -f notyet &&\n' span_id:2437) (Token id: Id.Lit_Chars val: '\ttest "z$(git config --file=notyet test.frotz)" = znitfol &&\n' span_id: 2438 ) (Token id:Id.Lit_Chars val:'\tgit config --file=myconfig test.xyzzy rezrov &&\n' span_id:2439) (Token id:Id.Lit_Chars val:'\ttest -h myconfig &&\n' span_id:2440) (Token id:Id.Lit_Chars val:'\ttest -f notyet &&\n' span_id:2441) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:2442) (Token id:Id.Lit_Chars val:'\tnitfol\n' span_id:2443) (Token id:Id.Lit_Chars val:'\trezrov\n' span_id:2444) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2445) (Token id:Id.Lit_Chars val:'\t{\n' span_id:2446) (Token id: Id.Lit_Chars val: '\t\tgit config --file=notyet test.frotz &&\n' span_id: 2447 ) (Token id:Id.Lit_Chars val:'\t\tgit config --file=notyet test.xyzzy\n' span_id:2448) (Token id:Id.Lit_Chars val:'\t} >actual &&\n' span_id:2449) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2450) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'nonexistent configuration' span_id:2457))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2461) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --file=doesnotexist --list &&\n' span_id: 2462 ) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --file=doesnotexist test.xyzzy\n' span_id: 2463 ) ) } ) (C {(test_expect_success)} {(SYMLINKS)} {(SQ (Token id:Id.Lit_Chars val:'symlink to nonexistent configuration' span_id:2472))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2476) (Token id:Id.Lit_Chars val:'\tln -s doesnotexist linktonada &&\n' span_id:2477) (Token id:Id.Lit_Chars val:'\tln -s linktonada linktolinktonada &&\n' span_id:2478) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --file=linktonada --list &&\n' span_id: 2479 ) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --file=linktolinktonada --list\n' span_id: 2480 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'check split_cmdline return' span_id:2487))} { (DQ ('\n') ("\tgit config alias.split-cmdline-fix 'echo ") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:2493) ) ("' &&\n") ('\ttest_must_fail git split-cmdline-fix &&\n') ('\techo foo > foo &&\n') ('\tgit add foo &&\n') ("\tgit commit -m 'initial commit' &&\n") ("\tgit config branch.master.mergeoptions 'echo ") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:2500) ) ("' &&\n") ('\ttest_must_fail git merge master\n') ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git -c "key=value" support' span_id:2509))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2513) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:2514) (Token id:Id.Lit_Chars val:'\tvalue\n' span_id:2515) (Token id:Id.Lit_Chars val:'\tvalue\n' span_id:2516) (Token id:Id.Lit_Chars val:'\ttrue\n' span_id:2517) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2518) (Token id:Id.Lit_Chars val:'\t{\n' span_id:2519) (Token id:Id.Lit_Chars val:'\t\tgit -c core.name=value config core.name &&\n' span_id:2520) (Token id: Id.Lit_Chars val: '\t\tgit -c foo.CamelCase=value config foo.camelcase &&\n' span_id: 2521 ) (Token id:Id.Lit_Chars val:'\t\tgit -c foo.flag config --bool foo.flag\n' span_id:2522) (Token id:Id.Lit_Chars val:'\t} >actual &&\n' span_id:2523) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:2524) (Token id: Id.Lit_Chars val: '\ttest_must_fail git -c name=value config core.name\n' span_id: 2525 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git -c can represent empty string' span_id:2547))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2551) (Token id:Id.Lit_Chars val:'\techo >expect &&\n' span_id:2552) (Token id:Id.Lit_Chars val:'\tgit -c foo.empty= config --path foo.empty >actual &&\n' span_id:2553) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2554) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'key sanity-checking' span_id:2561))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2565) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config foo=bar &&\n' span_id: 2566 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config foo=.bar &&\n' span_id:2567) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config foo.ba=r &&\n' span_id: 2568 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config foo.1bar &&\n' span_id:2569) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config foo."ba\n' span_id:2570) (Token id:Id.Lit_Chars val:'\t\t\t\tz".bar &&\n' span_id:2571) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config . false &&\n' span_id: 2572 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config .foo false &&\n' span_id:2573) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config foo. false &&\n' span_id: 2574 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config .foo. false &&\n' span_id:2575) (Token id:Id.Lit_Chars val:'\tgit config foo.bar true &&\n' span_id:2576) (Token id:Id.Lit_Chars val:'\tgit config foo."ba =z".bar false\n' span_id:2577) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git -c works with aliases of builtins' span_id:2584))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2588) (Token id: Id.Lit_Chars val: '\tgit config alias.checkconfig "-c foo.check=bar config foo.check" &&\n' span_id: 2589 ) (Token id:Id.Lit_Chars val:'\techo bar >expect &&\n' span_id:2590) (Token id:Id.Lit_Chars val:'\tgit checkconfig >actual &&\n' span_id:2591) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2592) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git -c does not split values on equals' span_id:2599))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2603) (Token id: Id.Lit_Chars val: '\techo "value with = in it" >expect &&\n' span_id: 2604 ) (Token id: Id.Lit_Chars val: '\tgit -c core.foo="value with = in it" config core.foo >actual &&\n' span_id: 2605 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2606) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git -c dies on bogus config' span_id:2613))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2617) (Token id: Id.Lit_Chars val: '\ttest_must_fail git -c core.bare=foo rev-parse\n' span_id: 2618 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git -c complains about empty key' span_id:2625))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2629) (Token id: Id.Lit_Chars val: '\ttest_must_fail git -c "=foo" rev-parse\n' span_id: 2630 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git -c complains about empty key and value' span_id:2637))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2641) (Token id:Id.Lit_Chars val:'\ttest_must_fail git -c "" rev-parse\n' span_id:2642) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'multiple git -c appends config' span_id:2649))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2653) (Token id: Id.Lit_Chars val: '\ttest_config alias.x "!git -c x.two=2 config --get-regexp ^x\\.*" &&\n' span_id: 2654 ) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:2655) (Token id:Id.Lit_Chars val:'\tx.one 1\n' span_id:2656) (Token id:Id.Lit_Chars val:'\tx.two 2\n' span_id:2657) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2658) (Token id:Id.Lit_Chars val:'\tgit -c x.one=1 x >actual &&\n' span_id:2659) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2660) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git -c is not confused by empty environment' span_id:2667))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2671) (Token id: Id.Lit_Chars val: '\tGIT_CONFIG_PARAMETERS="" git -c x.one=1 config --list\n' span_id: 2672 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git config --edit works' span_id:2679))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2683) (Token id:Id.Lit_Chars val:'\tgit config -f tmp test.value no &&\n' span_id:2684) (Token id:Id.Lit_Chars val:'\techo test.value=yes >expect &&\n' span_id:2685) (Token id: Id.Lit_Chars val: '\tGIT_EDITOR="echo [test]value=yes >" git config -f tmp --edit &&\n' span_id: 2686 ) (Token id:Id.Lit_Chars val:'\tgit config -f tmp --list >actual &&\n' span_id:2687) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2688) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git config --edit respects core.editor' span_id:2695))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2699) (Token id:Id.Lit_Chars val:'\tgit config -f tmp test.value no &&\n' span_id:2700) (Token id:Id.Lit_Chars val:'\techo test.value=yes >expect &&\n' span_id:2701) (Token id: Id.Lit_Chars val: '\ttest_config core.editor "echo [test]value=yes >" &&\n' span_id: 2702 ) (Token id:Id.Lit_Chars val:'\tgit config -f tmp --edit &&\n' span_id:2703) (Token id: Id.Lit_Chars val: '\tgit config -f tmp --list >actual &&\n' span_id: 2704 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2705) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'barf on syntax error' span_id:2715))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2719) (Token id:Id.Lit_Chars val:'\tcat >.git/config <<-\\EOF &&\n' span_id:2720) (Token id:Id.Lit_Chars val:'\t# broken section line\n' span_id:2721) (Token id:Id.Lit_Chars val:'\t[section]\n' span_id:2722) (Token id:Id.Lit_Chars val:'\tkey garbage\n' span_id:2723) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2724) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --get section.key >actual 2>error &&\n' span_id: 2725 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep " line 3 " error\n' span_id:2726) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'barf on incomplete section header' span_id:2733))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2737) (Token id:Id.Lit_Chars val:'\tcat >.git/config <<-\\EOF &&\n' span_id:2738) (Token id:Id.Lit_Chars val:'\t# broken section line\n' span_id:2739) (Token id:Id.Lit_Chars val:'\t[section\n' span_id:2740) (Token id:Id.Lit_Chars val:'\tkey = value\n' span_id:2741) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2742) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --get section.key >actual 2>error &&\n' span_id: 2743 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep " line 2 " error\n' span_id:2744) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'barf on incomplete string' span_id:2751))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2755) (Token id:Id.Lit_Chars val:'\tcat >.git/config <<-\\EOF &&\n' span_id:2756) (Token id:Id.Lit_Chars val:'\t# broken section line\n' span_id:2757) (Token id:Id.Lit_Chars val:'\t[section]\n' span_id:2758) (Token id:Id.Lit_Chars val:'\tkey = "value string\n' span_id:2759) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2760) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config --get section.key >actual 2>error &&\n' span_id: 2761 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep " line 3 " error\n' span_id:2762) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:urlmatch span_id:2769))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2773) (Token id:Id.Lit_Chars val:'\tcat >.git/config <<-\\EOF &&\n' span_id:2774) (Token id:Id.Lit_Chars val:'\t[http]\n' span_id:2775) (Token id:Id.Lit_Chars val:'\t\tsslVerify\n' span_id:2776) (Token id:Id.Lit_Chars val:'\t[http "https://weak.example.com"]\n' span_id:2777) (Token id:Id.Lit_Chars val:'\t\tsslVerify = false\n' span_id:2778) (Token id:Id.Lit_Chars val:'\t\tcookieFile = /tmp/cookie.txt\n' span_id:2779) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2780) (Token id:Id.Lit_Chars val:'\n' span_id:2781) (Token id: Id.Lit_Chars val: '\ttest_expect_code 1 git config --bool --get-urlmatch doesnt.exist https://good.example.com >actual &&\n' span_id: 2782 ) (Token id:Id.Lit_Chars val:'\ttest_must_be_empty actual &&\n' span_id:2783) (Token id:Id.Lit_Chars val:'\n' span_id:2784) (Token id:Id.Lit_Chars val:'\techo true >expect &&\n' span_id:2785) (Token id: Id.Lit_Chars val: '\tgit config --bool --get-urlmatch http.SSLverify https://good.example.com >actual &&\n' span_id: 2786 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:2787) (Token id:Id.Lit_Chars val:'\n' span_id:2788) (Token id:Id.Lit_Chars val:'\techo false >expect &&\n' span_id:2789) (Token id: Id.Lit_Chars val: '\tgit config --bool --get-urlmatch http.sslverify https://weak.example.com >actual &&\n' span_id: 2790 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual &&\n' span_id:2791) (Token id:Id.Lit_Chars val:'\n' span_id:2792) (Token id:Id.Lit_Chars val:'\t{\n' span_id:2793) (Token id: Id.Lit_Chars val: '\t\techo http.cookiefile /tmp/cookie.txt &&\n' span_id: 2794 ) (Token id:Id.Lit_Chars val:'\t\techo http.sslverify false\n' span_id:2795) (Token id:Id.Lit_Chars val:'\t} >expect &&\n' span_id:2796) (Token id: Id.Lit_Chars val: '\tgit config --get-urlmatch HTTP https://weak.example.com >actual &&\n' span_id: 2797 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:2798) ) } ) (C {(test_expect_failure)} { (SQ (Token id: Id.Lit_Chars val: 'unsetting the last key in a section removes header' span_id: 2808 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2812) (Token id:Id.Lit_Chars val:'\tcat >.git/config <<-\\EOF &&\n' span_id:2813) (Token id: Id.Lit_Chars val: '\t# some generic comment on the configuration file itself\n' span_id: 2814 ) (Token id:Id.Lit_Chars val:'\t# a comment specific to this "section" section.\n' span_id:2815) (Token id:Id.Lit_Chars val:'\t[section]\n' span_id:2816) (Token id:Id.Lit_Chars val:'\t# some intervening lines\n' span_id:2817) (Token id:Id.Lit_Chars val:'\t# that should also be dropped\n' span_id:2818) (Token id:Id.Lit_Chars val:'\n' span_id:2819) (Token id:Id.Lit_Chars val:'\tkey = value\n' span_id:2820) (Token id:Id.Lit_Chars val:'\t# please be careful when you update the above variable\n' span_id:2821) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2822) (Token id:Id.Lit_Chars val:'\n' span_id:2823) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:2824) (Token id: Id.Lit_Chars val: '\t# some generic comment on the configuration file itself\n' span_id: 2825 ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2826) (Token id:Id.Lit_Chars val:'\n' span_id:2827) (Token id:Id.Lit_Chars val:'\tgit config --unset section.key &&\n' span_id:2828) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:2829) ) } ) (C {(test_expect_failure)} { (SQ (Token id: Id.Lit_Chars val: 'adding a key into an empty section reuses header' span_id: 2836 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2840) (Token id:Id.Lit_Chars val:'\tcat >.git/config <<-\\EOF &&\n' span_id:2841) (Token id:Id.Lit_Chars val:'\t[section]\n' span_id:2842) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2843) (Token id:Id.Lit_Chars val:'\n' span_id:2844) (Token id:Id.Lit_Chars val:'\tq_to_tab >expect <<-\\EOF &&\n' span_id:2845) (Token id:Id.Lit_Chars val:'\t[section]\n' span_id:2846) (Token id:Id.Lit_Chars val:'\tQkey = value\n' span_id:2847) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2848) (Token id:Id.Lit_Chars val:'\n' span_id:2849) (Token id:Id.Lit_Chars val:'\tgit config section.key value &&\n' span_id:2850) (Token id:Id.Lit_Chars val:'\ttest_cmp expect .git/config\n' span_id:2851) ) } ) (C {(test_expect_success)} {(POSIXPERM) (Id.Lit_Comma ',') (PERL)} {(SQ (Token id:Id.Lit_Chars val:'preserves existing permissions' span_id:2862))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2866) (Token id:Id.Lit_Chars val:'\tchmod 0600 .git/config &&\n' span_id:2867) (Token id:Id.Lit_Chars val:'\tgit config imap.pass Hunter2 &&\n' span_id:2868) (Token id:Id.Lit_Chars val:'\tperl -e \\\n' span_id:2869) (Token id: Id.Lit_Chars val: '\t "die q(badset) if ((stat(q(.git/config)))[2] & 07777) != 0600" &&\n' span_id: 2870 ) (Token id:Id.Lit_Chars val:'\tgit config --rename-section imap pop &&\n' span_id:2871) (Token id:Id.Lit_Chars val:'\tperl -e \\\n' span_id:2872) (Token id: Id.Lit_Chars val: '\t "die q(badrename) if ((stat(q(.git/config)))[2] & 07777) != 0600"\n' span_id: 2873 ) ) } ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Pipeline children:[(C {(test_have_prereq)} {(MINGW)})] negated:T) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HOME) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2887) command_list: (command.CommandList children:[(C {(pwd)})]) ) ) } spids: [2885] ) ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set up --show-origin tests' span_id:2899))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2903) (Token id:Id.Lit_Chars val:'\tINCLUDE_DIR="$HOME/include" &&\n' span_id:2904) (Token id:Id.Lit_Chars val:'\tmkdir -p "$INCLUDE_DIR" &&\n' span_id:2905) (Token id: Id.Lit_Chars val: '\tcat >"$INCLUDE_DIR"/absolute.include <<-\\EOF &&\n' span_id: 2906 ) (Token id:Id.Lit_Chars val:'\t\t[user]\n' span_id:2907) (Token id:Id.Lit_Chars val:'\t\t\tabsolute = include\n' span_id:2908) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2909) (Token id: Id.Lit_Chars val: '\tcat >"$INCLUDE_DIR"/relative.include <<-\\EOF &&\n' span_id: 2910 ) (Token id:Id.Lit_Chars val:'\t\t[user]\n' span_id:2911) (Token id:Id.Lit_Chars val:'\t\t\trelative = include\n' span_id:2912) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2913) (Token id:Id.Lit_Chars val:'\tcat >"$HOME"/.gitconfig <<-EOF &&\n' span_id:2914) (Token id:Id.Lit_Chars val:'\t\t[user]\n' span_id:2915) (Token id:Id.Lit_Chars val:'\t\t\tglobal = true\n' span_id:2916) (Token id:Id.Lit_Chars val:'\t\t\toverride = global\n' span_id:2917) (Token id:Id.Lit_Chars val:'\t\t[include]\n' span_id:2918) (Token id:Id.Lit_Chars val:'\t\t\tpath = "$INCLUDE_DIR/absolute.include"\n' span_id:2919) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2920) (Token id:Id.Lit_Chars val:'\tcat >.git/config <<-\\EOF\n' span_id:2921) (Token id:Id.Lit_Chars val:'\t\t[user]\n' span_id:2922) (Token id:Id.Lit_Chars val:'\t\t\tlocal = true\n' span_id:2923) (Token id:Id.Lit_Chars val:'\t\t\toverride = local\n' span_id:2924) (Token id:Id.Lit_Chars val:'\t\t[include]\n' span_id:2925) (Token id: Id.Lit_Chars val: '\t\t\tpath = ../include/relative.include\n' span_id: 2926 ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2927) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin with --list' span_id:2934))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2938) (Token id:Id.Lit_Chars val:'\tcat >expect <<-EOF &&\n' span_id:2939) (Token id:Id.Lit_Chars val:'\t\tfile:$HOME/.gitconfig\tuser.global=true\n' span_id:2940) (Token id: Id.Lit_Chars val: '\t\tfile:$HOME/.gitconfig\tuser.override=global\n' span_id: 2941 ) (Token id: Id.Lit_Chars val: '\t\tfile:$HOME/.gitconfig\tinclude.path=$INCLUDE_DIR/absolute.include\n' span_id: 2942 ) (Token id: Id.Lit_Chars val: '\t\tfile:$INCLUDE_DIR/absolute.include\tuser.absolute=include\n' span_id: 2943 ) (Token id:Id.Lit_Chars val:'\t\tfile:.git/config\tuser.local=true\n' span_id:2944) (Token id: Id.Lit_Chars val: '\t\tfile:.git/config\tuser.override=local\n' span_id: 2945 ) (Token id: Id.Lit_Chars val: '\t\tfile:.git/config\tinclude.path=../include/relative.include\n' span_id: 2946 ) (Token id: Id.Lit_Chars val: '\t\tfile:.git/../include/relative.include\tuser.relative=include\n' span_id: 2947 ) (Token id:Id.Lit_Chars val:'\t\tcommand line:\tuser.cmdline=true\n' span_id:2948) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2949) (Token id: Id.Lit_Chars val: '\tgit -c user.cmdline=true config --list --show-origin >output &&\n' span_id: 2950 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:2951) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin with --list --null' span_id:2958))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2962) (Token id:Id.Lit_Chars val:'\tcat >expect <<-EOF &&\n' span_id:2963) (Token id:Id.Lit_Chars val:'\t\tfile:$HOME/.gitconfigQuser.global\n' span_id:2964) (Token id: Id.Lit_Chars val: '\t\ttrueQfile:$HOME/.gitconfigQuser.override\n' span_id: 2965 ) (Token id:Id.Lit_Chars val:'\t\tglobalQfile:$HOME/.gitconfigQinclude.path\n' span_id:2966) (Token id: Id.Lit_Chars val: '\t\t$INCLUDE_DIR/absolute.includeQfile:$INCLUDE_DIR/absolute.includeQuser.absolute\n' span_id: 2967 ) (Token id:Id.Lit_Chars val:'\t\tincludeQfile:.git/configQuser.local\n' span_id:2968) (Token id: Id.Lit_Chars val: '\t\ttrueQfile:.git/configQuser.override\n' span_id: 2969 ) (Token id:Id.Lit_Chars val:'\t\tlocalQfile:.git/configQinclude.path\n' span_id:2970) (Token id: Id.Lit_Chars val: '\t\t../include/relative.includeQfile:.git/../include/relative.includeQuser.relative\n' span_id: 2971 ) (Token id:Id.Lit_Chars val:'\t\tincludeQcommand line:Quser.cmdline\n' span_id:2972) (Token id:Id.Lit_Chars val:'\t\ttrueQ\n' span_id:2973) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2974) (Token id: Id.Lit_Chars val: '\tgit -c user.cmdline=true config --null --list --show-origin >output.raw &&\n' span_id: 2975 ) (Token id:Id.Lit_Chars val:'\tnul_to_q <output.raw >output &&\n' span_id:2976) (Token id: Id.Lit_Chars val: '\t# The here-doc above adds a newline that the --null output would not\n' span_id: 2977 ) (Token id:Id.Lit_Chars val:'\t# include. Add it here to make the two comparable.\n' span_id:2978) (Token id:Id.Lit_Chars val:'\techo >>output &&\n' span_id:2979) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:2980) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin with single file' span_id:2987))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:2991) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:2992) (Token id:Id.Lit_Chars val:'\t\tfile:.git/config\tuser.local=true\n' span_id:2993) (Token id: Id.Lit_Chars val: '\t\tfile:.git/config\tuser.override=local\n' span_id: 2994 ) (Token id: Id.Lit_Chars val: '\t\tfile:.git/config\tinclude.path=../include/relative.include\n' span_id: 2995 ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:2996) (Token id: Id.Lit_Chars val: '\tgit config --local --list --show-origin >output &&\n' span_id: 2997 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:2998) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin with --get-regexp' span_id:3005))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:3009) (Token id:Id.Lit_Chars val:'\tcat >expect <<-EOF &&\n' span_id:3010) (Token id:Id.Lit_Chars val:'\t\tfile:$HOME/.gitconfig\tuser.global true\n' span_id:3011) (Token id: Id.Lit_Chars val: '\t\tfile:.git/config\tuser.local true\n' span_id: 3012 ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3013) (Token id: Id.Lit_Chars val: '\tgit config --show-origin --get-regexp "user\\.[g|l].*" >output &&\n' span_id: 3014 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:3015) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin getting a single key' span_id:3022))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:3026) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:3027) (Token id:Id.Lit_Chars val:'\t\tfile:.git/config\tlocal\n' span_id:3028) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3029) (Token id:Id.Lit_Chars val:'\tgit config --show-origin user.override >output &&\n' span_id:3030) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:3031) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'set up custom config file' span_id:3038))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:3042) (Token id: Id.Lit_Chars val: '\tCUSTOM_CONFIG_FILE="file\\" (dq) and spaces.conf" &&\n' span_id: 3043 ) (Token id:Id.Lit_Chars val:'\tcat >"$CUSTOM_CONFIG_FILE" <<-\\EOF\n' span_id:3044) (Token id:Id.Lit_Chars val:'\t\t[user]\n' span_id:3045) (Token id:Id.Lit_Chars val:'\t\t\tcustom = true\n' span_id:3046) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3047) ) } ) (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} { (SQ (Token id: Id.Lit_Chars val: '--show-origin escape special file name characters' span_id: 3057 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:3061) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:3062) (Token id: Id.Lit_Chars val: '\t\tfile:"file\\" (dq) and spaces.conf"\tuser.custom=true\n' span_id: 3063 ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3064) (Token id: Id.Lit_Chars val: '\tgit config --file "$CUSTOM_CONFIG_FILE" --show-origin --list >output &&\n' span_id: 3065 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:3066) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin stdin' span_id:3073))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:3077) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:3078) (Token id:Id.Lit_Chars val:'\t\tstandard input:\tuser.custom=true\n' span_id:3079) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3080) (Token id: Id.Lit_Chars val: '\tgit config --file - --show-origin --list <"$CUSTOM_CONFIG_FILE" >output &&\n' span_id: 3081 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:3082) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin stdin with file include' span_id:3089))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:3093) (Token id: Id.Lit_Chars val: '\tcat >"$INCLUDE_DIR"/stdin.include <<-EOF &&\n' span_id: 3094 ) (Token id:Id.Lit_Chars val:'\t\t[user]\n' span_id:3095) (Token id:Id.Lit_Chars val:'\t\t\tstdin = include\n' span_id:3096) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3097) (Token id:Id.Lit_Chars val:'\tcat >expect <<-EOF &&\n' span_id:3098) (Token id:Id.Lit_Chars val:'\t\tfile:$INCLUDE_DIR/stdin.include\tinclude\n' span_id:3099) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3100) (Token id: Id.Lit_Chars val: '\techo "[include]path=\\"$INCLUDE_DIR\\"/stdin.include" \\\n' span_id: 3101 ) (Token id: Id.Lit_Chars val: '\t\t| git config --show-origin --includes --file - user.stdin >output &&\n' span_id: 3102 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:3103) ) } ) (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin blob' span_id:3113))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:3117) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:3118) (Token id: Id.Lit_Chars val: '\t\tblob:a9d9f9e555b5c6f07cbe09d3f06fe3df11e09c08\tuser.custom=true\n' span_id: 3119 ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3120) (Token id: Id.Lit_Chars val: '\tblob=$(git hash-object -w "$CUSTOM_CONFIG_FILE") &&\n' span_id: 3121 ) (Token id: Id.Lit_Chars val: '\tgit config --blob=$blob --show-origin --list >output &&\n' span_id: 3122 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:3123) ) } ) (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} {(SQ (Token id:Id.Lit_Chars val:'--show-origin blob ref' span_id:3133))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:3137) (Token id:Id.Lit_Chars val:'\tcat >expect <<-\\EOF &&\n' span_id:3138) (Token id: Id.Lit_Chars val: '\t\tblob:"master:file\\" (dq) and spaces.conf"\tuser.custom=true\n' span_id: 3139 ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:3140) (Token id:Id.Lit_Chars val:'\tgit add "$CUSTOM_CONFIG_FILE" &&\n' span_id:3141) (Token id:Id.Lit_Chars val:'\tgit commit -m "new config file" &&\n' span_id:3142) (Token id: Id.Lit_Chars val: '\tgit config --blob=master:"$CUSTOM_CONFIG_FILE" --show-origin --list >output &&\n' span_id: 3143 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect output\n' span_id:3144) ) } ) (C {(test_done)}) ] )