(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: 'check output directory names used by git-clone' span_id: 6 ) ) } spids: [4] ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup ssh wrapper' span_id:26))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:30) (Token id: Id.Lit_Chars val: '\twrite_script "$TRASH_DIRECTORY/ssh-wrapper" <<-\\EOF &&\n' span_id: 31 ) (Token id:Id.Lit_Chars val:'\tgit upload-pack "$TRASH_DIRECTORY"\n' span_id:32) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:33) (Token id:Id.Lit_Chars val:'\tGIT_SSH="$TRASH_DIRECTORY/ssh-wrapper" &&\n' span_id:34) (Token id:Id.Lit_Chars val:'\texport GIT_SSH &&\n' span_id:35) (Token id:Id.Lit_Chars val:'\texport TRASH_DIRECTORY\n' span_id:36) ) } ) (command.ShFunction name: test_clone_dir body: (command.BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [51] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:53) ) (C {(shift)}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dir) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [58] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:60) ) (C {(shift)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:expect) op: assign_op.Equal rhs: {(success)} spids: [65] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bare) op: assign_op.Equal rhs: {(non-bare)} spids: [69] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:clone_opts) op: assign_op.Equal rhs: (word.Empty) spids: [73] ) ] ) (command.ForEach iter_name: i iter_words: [{(DQ ($ Id.VSub_At '$@'))}] do_arg_iter: F body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$i'))} arms: [ (case_arm pat_list: [{(fail)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:expect) op: assign_op.Equal rhs: {(failure)} spids: [103] ) ] ) ] spids: [99 100 107 -1] ) (case_arm pat_list: [{(bare)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bare) op: assign_op.Equal rhs: {(bare)} spids: [114] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:clone_opts) op: assign_op.Equal rhs: {(--bare)} spids: [118] ) ] ) ] spids: [110 111 122 -1] ) ] ) ] ) ) (C {(test_expect_) ($ Id.VSub_DollarName '$expect')} { (DQ ('clone of ') ($ Id.VSub_DollarName '$url') (' goes to ') ($ Id.VSub_DollarName '$dir') (' (') ($ Id.VSub_DollarName '$bare') (')') ) } { (DQ ('\n') ('\t\trm -rf ') ($ Id.VSub_DollarName '$dir') (' &&\n') ('\t\tgit clone ') ($ Id.VSub_DollarName '$clone_opts') (' ') ($ Id.VSub_DollarName '$url') (' &&\n') ('\t\ttest_path_is_dir ') ($ Id.VSub_DollarName '$dir') ('\n') ('\t') ) } ) ] ) ) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo.git)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo.git)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo/.git)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo/.git)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo.git)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo.git)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo/.git)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo/.git)} {(foo.git)} {(bare)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo/)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo///)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo/.git/)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo.git/)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo.git///)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo///.git/)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo/.git///)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo/)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo///)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo.git/)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo/.git/)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo.git///)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo///.git/)} {(foo)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (foo/.git///)} {(foo)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/)} {(host)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host) (Id.Lit_Other ':') (1234/)} {(host)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//user) (Id.Lit_Splice '@host') (/)} {(host)}) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (/)} {(host)}) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//user) (Id.Lit_Other ':') (password) (Id.Lit_Splice '@host') (/)} {(host)} ) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//user) (Id.Lit_Other ':') (password) (Id.Lit_Splice '@host') (Id.Lit_Other ':') (1234/) } {(host)} ) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//user) (Id.Lit_Other ':') (passw) (Id.Lit_Splice '@rd') (Id.Lit_Splice '@host') (Id.Lit_Other ':') (1234/) } {(host)} ) (C {(test_clone_dir)} {(user) (Id.Lit_Splice '@host') (Id.Lit_Other ':') (/)} {(host)}) (C {(test_clone_dir)} {(user) (Id.Lit_Other ':') (password) (Id.Lit_Splice '@host') (Id.Lit_Other ':') (/)} {(host)} ) (C {(test_clone_dir)} {(user) (Id.Lit_Other ':') (passw) (Id.Lit_Splice '@rd') (Id.Lit_Splice '@host') (Id.Lit_Other ':') (/) } {(host)} ) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo) (Id.Lit_Splice '@bar')} {(foo) (Id.Lit_Splice '@bar')} ) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//host/foo) (Id.Lit_Splice '@bar') (.git)} {(foo) (Id.Lit_Splice '@bar')} ) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//user) (Id.Lit_Other ':') (password) (Id.Lit_Splice '@host') (/foo) (Id.Lit_Splice '@bar') } {(foo) (Id.Lit_Splice '@bar')} ) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//user) (Id.Lit_Other ':') (passw) (Id.Lit_Splice '@rd') (Id.Lit_Splice '@host') (/foo) (Id.Lit_Splice '@bar') (.git) } {(foo) (Id.Lit_Splice '@bar')} ) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (/foo) (Id.Lit_Splice '@bar')} {(foo) (Id.Lit_Splice '@bar')} ) (C {(test_clone_dir)} {(host) (Id.Lit_Other ':') (/foo) (Id.Lit_Splice '@bar') (.git)} {(foo) (Id.Lit_Splice '@bar')} ) (C {(test_clone_dir)} {(user) (Id.Lit_Other ':') (password) (Id.Lit_Splice '@host') (Id.Lit_Other ':') (/foo) (Id.Lit_Splice '@bar') } {(foo) (Id.Lit_Splice '@bar')} ) (C {(test_clone_dir)} {(user) (Id.Lit_Other ':') (passw) (Id.Lit_Splice '@rd') (Id.Lit_Splice '@host') (Id.Lit_Other ':') (/foo) (Id.Lit_Splice '@bar') (.git) } {(foo) (Id.Lit_Splice '@bar')} ) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//user) (Id.Lit_Other ':') (password) (Id.Lit_Splice '@host') (/test) (Id.Lit_Other ':') (1234) } {(1234)} ) (C {(test_clone_dir)} {(ssh) (Id.Lit_Other ':') (//user) (Id.Lit_Other ':') (password) (Id.Lit_Splice '@host') (/test) (Id.Lit_Other ':') (1234.git) } {(1234)} ) (C {(test_done)}) ] )