(command.CommandList children: [ (command.ShAssignment left: <Id.Lit_VarLike 'test_description='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'test_description='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: { (SQ <'git web--browse basic tests\n'> <'\n'> <'This test checks that git web--browse can handle various valid URLs.'> ) } ) ] redirects: [] ) (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {<'./test-lib.sh'>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <test_web_browse> name: test_web_browse body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr children: [ (command.Simple blame_tok: <git> more_env: [] words: [ {<git>} {<web--browse>} {<--browser> <Id.Lit_Equals '='> (DQ ($ Id.VSub_Number 1))} {(DQ ($ Id.VSub_Number 2))} ] redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<actual>})] do_fork: T ) (command.Simple blame_tok: <tr> more_env: [] words: [{<tr>} {<-d>} {(SQ <'\\015'>)}] redirects: [ (Redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {<actual>} ) (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<text>} ) ] do_fork: T ) (command.Simple blame_tok: <test_cmp> more_env: [] words: [{<test_cmp>} {<expect>} {<text>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <test_expect_success> more_env: [] words: [ {<test_expect_success>} {(SQ <'URL with an ampersand in it'>)} { (SQ <'\n'> <'\techo http://example.com/foo\\&bar >expect &&\n'> <'\tgit config browser.custom.cmd echo &&\n'> <'\ttest_web_browse custom http://example.com/foo\\&bar\n'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_expect_success> more_env: [] words: [ {<test_expect_success>} {(SQ <'URL with a semi-colon in it'>)} { (SQ <'\n'> <'\techo http://example.com/foo\\;bar >expect &&\n'> <'\tgit config browser.custom.cmd echo &&\n'> <'\ttest_web_browse custom http://example.com/foo\\;bar\n'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_expect_success> more_env: [] words: [ {<test_expect_success>} {(SQ <'URL with a hash in it'>)} { (SQ <'\n'> <'\techo http://example.com/foo#bar >expect &&\n'> <'\tgit config browser.custom.cmd echo &&\n'> <'\ttest_web_browse custom http://example.com/foo#bar\n'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_expect_success> more_env: [] words: [ {<test_expect_success>} {(SQ <'browser paths are properly quoted'>)} { (SQ <'\n'> <'\techo fake: http://example.com/foo >expect &&\n'> <'\tcat >"fake browser" <<-\\EOF &&\n'> <'\t#!/bin/sh\n'> <'\techo fake: "$@"\n'> <'\tEOF\n'> <'\tchmod +x "fake browser" &&\n'> <'\tgit config browser.w3m.path "$(pwd)/fake browser" &&\n'> <'\ttest_web_browse w3m http://example.com/foo\n'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_expect_success> more_env: [] words: [ {<test_expect_success>} {(SQ <'browser command allows arbitrary shell code'>)} { (SQ <'\n'> <'\techo "arg: http://example.com/foo" >expect &&\n'> <'\tgit config browser.custom.cmd "\n'> <'\t\tf() {\n'> <'\t\t\tfor i in \\"\\$@\\"; do\n'> <'\t\t\t\techo arg: \\$i\n'> <'\t\t\tdone\n'> <'\t\t}\n'> <'\t\tf" &&\n'> <'\ttest_web_browse custom http://example.com/foo\n'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <test_done> more_env: [] words: [{<test_done>}] redirects: [] do_fork: T ) ] )