(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description spids:[12]) op: Equal rhs: {(SQ <'check output directory names used by git-clone'>)} spids: [12] ) ] spids: [12] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <'setup ssh wrapper'>)} { (SQ <'\n'> <'\twrite_script "$TRASH_DIRECTORY/ssh-wrapper" <<-\\EOF &&\n'> <'\tgit upload-pack "$TRASH_DIRECTORY"\n'> <'\tEOF\n'> <'\tGIT_SSH="$TRASH_DIRECTORY/ssh-wrapper" &&\n'> <'\texport GIT_SSH &&\n'> <'\texport TRASH_DIRECTORY\n'> ) } ) (command.FuncDef name: test_clone_dir body: (command.BraceGroup children: [ (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:url spids:[59]) op: Equal rhs: {($ VSub_Number '$1')} spids: [59] ) ] spids: [59] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (command.Sentence child: (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dir spids:[66]) op: Equal rhs: {($ VSub_Number '$1')} spids: [66] ) ] spids: [66] ) terminator: <Op_Semi ';'> ) (C {(shift)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expect spids:[73]) op: Equal rhs: {(success)} spids: [73] ) ] spids: [73] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:bare spids:[77]) op: Equal rhs: {(non-bare)} spids: [77] ) ] spids: [77] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:clone_opts spids:[81]) op: Equal rhs: (word.EmptyWord) spids: [81] ) ] spids: [81] ) (command.ForEach iter_name: i iter_words: [{(DQ ($ VSub_At '$@'))}] do_arg_iter: F body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ VSub_Name '$i'))} arms: [ (case_arm pat_list: [{(fail)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expect spids:[111]) op: Equal rhs: {(failure)} spids: [111] ) ] spids: [111] ) ] spids: [107 108 115 16777215] ) (case_arm pat_list: [{(bare)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:bare spids:[122]) op: Equal rhs: {(bare)} spids: [122] ) ] spids: [122] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:clone_opts spids:[126]) op: Equal rhs: {(--bare)} spids: [126] ) ] spids: [126] ) ] spids: [118 119 130 16777215] ) ] spids: [98 104 133] ) ] spids: [95 136] ) spids: [89 16777215] ) (C {(test_expect_) ($ VSub_Name '$expect')} { (DQ ('clone of ') ($ VSub_Name '$url') (' goes to ') ($ VSub_Name '$dir') (' (') ($ VSub_Name '$bare') (')') ) } { (DQ ('\n') ('\t\trm -rf ') ($ VSub_Name '$dir') (' &&\n') ('\t\tgit clone ') ($ VSub_Name '$clone_opts') (' ') ($ VSub_Name '$url') (' &&\n') ('\t\ttest_path_is_dir ') ($ VSub_Name '$dir') ('\n') ('\t') ) } ) ] spids: [56] ) spids: [51 55] ) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo.git)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo.git)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo/.git)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo/.git)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo.git)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo.git)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo/.git)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo/.git)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo/)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo///)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo/.git/)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo.git/)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo.git///)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo///.git/)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo/.git///)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo/)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo///)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo.git/)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo/.git/)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo.git///)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo///.git/)} {(foo)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (foo/.git///)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/)} {(host)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host) (Lit_Other ':') (1234/)} {(host)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//user) (Lit_Other '@') (host/)} {(host)}) (C {(test_clone_dir)} {(host) (Lit_Other ':') (/)} {(host)}) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//user) (Lit_Other ':') (password) (Lit_Other '@') (host/)} {(host)} ) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//user) (Lit_Other ':') (password) (Lit_Other '@') (host) (Lit_Other ':') (1234/) } {(host)} ) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//user) (Lit_Other ':') (passw) (Lit_Other '@') (rd) (Lit_Other '@') (host) (Lit_Other ':') (1234/) } {(host)} ) (C {(test_clone_dir)} {(user) (Lit_Other '@') (host) (Lit_Other ':') (/)} {(host)}) (C {(test_clone_dir)} {(user) (Lit_Other ':') (password) (Lit_Other '@') (host) (Lit_Other ':') (/)} {(host)} ) (C {(test_clone_dir)} {(user) (Lit_Other ':') (passw) (Lit_Other '@') (rd) (Lit_Other '@') (host) (Lit_Other ':') (/)} {(host)} ) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo) (Lit_Other '@') (bar)} {(foo) (Lit_Other '@') (bar)} ) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//host/foo) (Lit_Other '@') (bar.git)} {(foo) (Lit_Other '@') (bar)} ) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//user) (Lit_Other ':') (password) (Lit_Other '@') (host/foo) (Lit_Other '@') (bar) } {(foo) (Lit_Other '@') (bar)} ) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//user) (Lit_Other ':') (passw) (Lit_Other '@') (rd) (Lit_Other '@') (host/foo) (Lit_Other '@') (bar.git) } {(foo) (Lit_Other '@') (bar)} ) (C {(test_clone_dir)} {(host) (Lit_Other ':') (/foo) (Lit_Other '@') (bar)} {(foo) (Lit_Other '@') (bar)} ) (C {(test_clone_dir)} {(host) (Lit_Other ':') (/foo) (Lit_Other '@') (bar.git)} {(foo) (Lit_Other '@') (bar)} ) (C {(test_clone_dir)} {(user) (Lit_Other ':') (password) (Lit_Other '@') (host) (Lit_Other ':') (/foo) (Lit_Other '@') (bar) } {(foo) (Lit_Other '@') (bar)} ) (C {(test_clone_dir)} {(user) (Lit_Other ':') (passw) (Lit_Other '@') (rd) (Lit_Other '@') (host) (Lit_Other ':') (/foo) (Lit_Other '@') (bar.git) } {(foo) (Lit_Other '@') (bar)} ) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//user) (Lit_Other ':') (password) (Lit_Other '@') (host/test) (Lit_Other ':') (1234) } {(1234)} ) (C {(test_clone_dir)} {(ssh) (Lit_Other ':') (//user) (Lit_Other ':') (password) (Lit_Other '@') (host/test) (Lit_Other ':') (1234.git) } {(1234)} ) (C {(test_done)}) ] )