(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 <'check output directory names used by git-clone'>)} spids: [4] ) ] redirects: [] ) (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.ShFunction name: test_clone_dir body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'url='> name:url) op: assign_op.Equal rhs: {($ Id.VSub_Number 1)} spids: [51] ) ] redirects: [] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dir='> name:dir) op: assign_op.Equal rhs: {($ Id.VSub_Number 1)} spids: [58] ) ] redirects: [] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'expect='> name:expect) op: assign_op.Equal rhs: {<success>} spids: [65] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bare='> name:bare) op: assign_op.Equal rhs: {<non-bare>} spids: [69] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'clone_opts='> name:clone_opts) op: assign_op.Equal rhs: (rhs_word.Empty) spids: [73] ) ] redirects: [] ) (command.ForEach iter_names: [i] iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '@'))}]) 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 left:<Id.Lit_VarLike 'expect='> name:expect) op: assign_op.Equal rhs: {<failure>} spids: [103] ) ] redirects: [] ) ] spids: [99 100 107 -1] ) (case_arm pat_list: [{<bare>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bare='> name:bare) op: assign_op.Equal rhs: {<bare>} spids: [114] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'clone_opts='> name: clone_opts ) op: assign_op.Equal rhs: {<--bare>} spids: [118] ) ] redirects: [] ) ] spids: [110 111 122 -1] ) ] redirects: [] ) ] ) redirects: [] ) (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'> ) } ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <foo>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <foo>} {<foo.git>} {<bare>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <foo.git>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <foo.git>} {<foo.git>} {<bare>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo/.git'>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo/.git'>} {<foo.git>} {<bare>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo'>} {<foo.git>} {<bare>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo.git'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo.git'>} {<foo.git>} {<bare>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo/.git'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo/.git'>} {<foo.git>} {<bare>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo/'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo///'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo/.git/'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo.git/'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo.git///'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo///.git/'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo/.git///'>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo/'>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo///'>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo.git/'>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo/.git/'>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo.git///'>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo///.git/'>} {<foo>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'foo/.git///'>} {<foo>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/'>} {<host>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host'> <Id.Lit_Colon ':'> <'1234/'>} {<host>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//user'> <Id.Lit_Splice '@host'> <'/'>} {<host>}) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'/'>} {<host>}) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//user'> <Id.Lit_Colon ':'> <password> <Id.Lit_Splice '@host'> <'/'>} {<host>} ) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//user'> <Id.Lit_Colon ':'> <password> <Id.Lit_Splice '@host'> <Id.Lit_Colon ':'> <'1234/'> } {<host>} ) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//user'> <Id.Lit_Colon ':'> <passw> <Id.Lit_Splice '@rd'> <Id.Lit_Splice '@host'> <Id.Lit_Colon ':'> <'1234/'> } {<host>} ) (C {<test_clone_dir>} {<user> <Id.Lit_Splice '@host'> <Id.Lit_Colon ':'> <'/'>} {<host>}) (C {<test_clone_dir>} {<user> <Id.Lit_Colon ':'> <password> <Id.Lit_Splice '@host'> <Id.Lit_Colon ':'> <'/'>} {<host>} ) (C {<test_clone_dir>} {<user> <Id.Lit_Colon ':'> <passw> <Id.Lit_Splice '@rd'> <Id.Lit_Splice '@host'> <Id.Lit_Colon ':'> <'/'> } {<host>} ) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo'> <Id.Lit_Splice '@bar'>} {<foo> <Id.Lit_Splice '@bar'>} ) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//host/foo'> <Id.Lit_Splice '@bar'> <.git>} {<foo> <Id.Lit_Splice '@bar'>} ) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//user'> <Id.Lit_Colon ':'> <password> <Id.Lit_Splice '@host'> <'/foo'> <Id.Lit_Splice '@bar'> } {<foo> <Id.Lit_Splice '@bar'>} ) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//user'> <Id.Lit_Colon ':'> <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_Colon ':'> <'/foo'> <Id.Lit_Splice '@bar'>} {<foo> <Id.Lit_Splice '@bar'>} ) (C {<test_clone_dir>} {<host> <Id.Lit_Colon ':'> <'/foo'> <Id.Lit_Splice '@bar'> <.git>} {<foo> <Id.Lit_Splice '@bar'>} ) (C {<test_clone_dir>} {<user> <Id.Lit_Colon ':'> <password> <Id.Lit_Splice '@host'> <Id.Lit_Colon ':'> <'/foo'> <Id.Lit_Splice '@bar'> } {<foo> <Id.Lit_Splice '@bar'>} ) (C {<test_clone_dir>} {<user> <Id.Lit_Colon ':'> <passw> <Id.Lit_Splice '@rd'> <Id.Lit_Splice '@host'> <Id.Lit_Colon ':'> <'/foo'> <Id.Lit_Splice '@bar'> <.git> } {<foo> <Id.Lit_Splice '@bar'>} ) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//user'> <Id.Lit_Colon ':'> <password> <Id.Lit_Splice '@host'> <'/test'> <Id.Lit_Colon ':'> <1234> } {<1234>} ) (C {<test_clone_dir>} {<ssh> <Id.Lit_Colon ':'> <'//user'> <Id.Lit_Colon ':'> <password> <Id.Lit_Splice '@host'> <'/test'> <Id.Lit_Colon ':'> <1234.git> } {<1234>} ) (C {<test_done>}) ] )