(List (= scope= flags=0 words=[] bindings=[('test_description', {[SQ ]})]) (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]} ) (= scope= flags=0 words=[] bindings=[('LIB_GIT_DAEMON_PORT', {[VarSub LIB_GIT_DAEMON_PORT test_op=VS_TEST_HYPHEN {[LIT_CHARS 5570]}]})]) (Com {[LIT_CHARS .]} {[DQ [VarSub TEST_DIRECTORY]] [LIT_CHARS /lib-git-daemon.sh]} ) (Com {[LIT_CHARS start_git_daemon]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ file &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ git-daemon-export-ok\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ >file &&\n"> ]} ) (Com {[LIT_CHARS test_expect_failure]} {[SQ ]} {[SQ output &&\n"> expect &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (FunctionDef test_remote_error [] (List (= scope= flags=0 words=[] bindings=[('do_export', {[LIT_CHARS YesPlease]})]) (While (Com {[LIT_CHARS test]} {[VarSub #]} {[LIT_CHARS -gt]} {[LIT_CHARS 0]} ) (Case to_match={[VarSub 1]}, pat_word_list=[[{[LIT_CHARS -x]}], [{[LIT_CHARS -n]}], [{[LIT_OTHER "*"]}]] (List (Com {[LIT_CHARS shift]} ) (Com {[LIT_CHARS chmod]} {[LIT_CHARS -x]} {[DQ [VarSub GIT_DAEMON_DOCUMENT_ROOT_PATH][LIT_CHARS /repo.git]]} ) ) (List (Com {[LIT_CHARS shift]} ) (= scope= flags=0 words=[] bindings=[('do_export', {[SQ ]})]) ) (Com {[LIT_CHARS break]} ) ) ) (= scope= flags=0 words=[] bindings=[('msg', {[VarSub 1]})]) (Com {[LIT_CHARS shift]} ) (= scope= flags=0 words=[] bindings=[('cmd', {[VarSub 1]})]) (Com {[LIT_CHARS shift]} ) (= scope= flags=0 words=[] bindings=[('repo', {[VarSub 1]})]) (AndOr OP_OR_IF (Com {[LIT_CHARS shift]} ) (Com {[LIT_CHARS error]} {[DQ [LIT_CHARS "invalid number of arguments"]]} ) ) (If (Com {[LIT_CHARS test]} {[LIT_CHARS -x]} {[DQ [VarSub GIT_DAEMON_DOCUMENT_ROOT_PATH][LIT_CHARS /][VarSub repo]]} ) (If (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub do_export]]} ) (Com {[LIT_OTHER ":"]} < (FilenameRedirectNode filename={[DQ [VarSub GIT_DAEMON_DOCUMENT_ROOT_PATH][LIT_CHARS /][VarSub repo][LIT_CHARS /git-daemon-export-ok]]} "> 1), > ) (ElseTrue) (Com {[LIT_CHARS rm]} {[LIT_CHARS -f]} {[DQ [VarSub GIT_DAEMON_DOCUMENT_ROOT_PATH][LIT_CHARS /][VarSub repo][LIT_CHARS /git-daemon-export-ok]]} ) ) ) (AndOr OP_AND_IF (Com {[LIT_CHARS test_must_fail]} {[LIT_CHARS git]} {[DQ [VarSub cmd]]} {[DQ [VarSub GIT_DAEMON_URL][LIT_CHARS /][VarSub repo]]} {[DQ [VarSub @]]} < (FilenameRedirectNode filename={[LIT_CHARS output]} "> 2), > ) (AndOr OP_AND_IF (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "fatal: remote error: "][VarSub msg][LIT_CHARS ": /"][VarSub repo]]} < (FilenameRedirectNode filename={[LIT_CHARS expect]} "> 1), > ) (Com {[LIT_CHARS test_cmp]} {[LIT_CHARS expect]} {[LIT_CHARS output]} ) ) ) (= scope= flags=0 words=[] bindings=[('ret', {[VarSub ?]})]) (Com {[LIT_CHARS chmod]} {[LIT_OTHER "+"] [LIT_CHARS x]} {[DQ [VarSub GIT_DAEMON_DOCUMENT_ROOT_PATH][LIT_CHARS /repo.git]]} ) (Subshell (Com {[LIT_CHARS exit]} {[VarSub ret]} ) ) ) ) (= scope= flags=0 words=[] bindings=[('msg', {[DQ [LIT_CHARS "access denied or repository not exported"]]})]) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "test_remote_error '"][VarSub msg][LIT_CHARS "' clone nowhere.git "]]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "test_remote_error '"][VarSub msg][LIT_CHARS "' push repo.git master"]]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "test_remote_error -x '"][VarSub msg][LIT_CHARS "' fetch repo.git "]]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "test_remote_error -n '"][VarSub msg][LIT_CHARS "' fetch repo.git "]]} ) (Com {[LIT_CHARS stop_git_daemon]} ) (Com {[LIT_CHARS start_git_daemon]} {[LIT_CHARS --informative-errors]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "test_remote_error 'no such repository' clone nowhere.git "]]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "test_remote_error 'service not enabled' push repo.git master"]]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "test_remote_error -x 'no such repository' fetch repo.git "]]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "test_remote_error -n 'repository not exported' fetch repo.git "]]} ) (Com {[LIT_CHARS stop_git_daemon]} ) (Com {[LIT_CHARS test_done]} ) )