(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <help>)} spids: [4] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShFunction name: configure_help body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<test_config>} {<help.format>} {<html>}) (C {<test_config>} {<help.htmlpath>} {<test> <Id.Lit_Colon ':'> <'//html'>}) (C {<test_config>} {<browser.test.cmd>} {<'./test-browser'>}) (C {<test_config>} {<help.browser>} {<test>}) ] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<test_expect_success>} {(DQ <setup>)} { (SQ <'\n'> <'\t# Just write out which page gets requested\n'> <'\twrite_script test-browser <<-\\EOF\n'> <'\techo "$*" >test-browser.log\n'> <'\tEOF\n'> ) } ) (C {<test_expect_success>} {(DQ <'works for commands and guides by default'>)} { (SQ <'\n'> <'\tconfigure_help &&\n'> <'\tgit help status &&\n'> <'\techo "test://html/git-status.html" >expect &&\n'> <'\ttest_cmp expect test-browser.log &&\n'> <'\tgit help revisions &&\n'> <'\techo "test://html/gitrevisions.html" >expect &&\n'> <'\ttest_cmp expect test-browser.log\n'> ) } ) (C {<test_expect_success>} {(DQ <'--exclude-guides does not work for guides'>)} { (SQ <'\n'> <'\t>test-browser.log &&\n'> <'\ttest_must_fail git help --exclude-guides revisions &&\n'> <'\ttest_must_be_empty test-browser.log\n'> ) } ) (C {<test_expect_success>} {(DQ <'--help does not work for guides'>)} { (DQ <'\n'> <'\tcat <<-EOF >expect &&\n'> <'\t\tgit: \'revisions\' is not a git command. See \'git --help\'.\n'> <'\tEOF\n'> <'\ttest_must_fail git revisions --help 2>actual &&\n'> <'\ttest_i18ncmp expect actual\n'> ) } ) (C {<test_done>}) ] )