(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) op: Equal rhs: {(SQ <'refspec parsing'>)} ) ] ) (C {(.)} {(./test-lib.sh)}) (command.FuncDef name: test_refspec body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:kind) op: Equal rhs: {($ VSub_Number '$1')} ) (assign_pair lhs: (lhs_expr.LhsName name:refspec) op: Equal rhs: {($ VSub_Number '$2')} ) (assign_pair lhs: (lhs_expr.LhsName name:expect) op: Equal rhs: {($ VSub_Number '$3')} ) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp] children: [ (C {(git)} {(config)} {(remote.frotz.url)} {(DQ (.))}) (C {(git)} {(config)} {(--remove-section)} {(remote.frotz)}) (C {(git)} {(config)} {(remote.frotz.url)} {(DQ (.))}) (C {(git)} {(config)} {(DQ (remote.frotz.) ($ VSub_DollarName '$kind'))} {(DQ ($ VSub_DollarName '$refspec'))} ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(DQ ($ VSub_DollarName '$expect'))} {(KW_Bang '!') (Lit_Other '=')} {(invalid)} ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title) op: Equal rhs: { (DQ ($ VSub_DollarName '$kind') (' ') ($ VSub_DollarName '$refspec')) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test) op: Equal rhs: {(SQ <'git ls-remote frotz'>)} ) ] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:title) op: Equal rhs: { (DQ ($ VSub_DollarName '$kind') (' ') ($ VSub_DollarName '$refspec') (' (invalid)') ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test) op: Equal rhs: {(SQ <'test_must_fail git ls-remote frotz'>)} ) ] ) ] ) ] ) (C {(test_expect_success)} {(DQ ($ VSub_DollarName '$title'))} {(DQ ($ VSub_DollarName '$test'))} ) ] ) ) (C {(test_refspec)} {(push)} {(SQ )} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <':'>)}) (C {(test_refspec)} {(push)} {(SQ <'::'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'+:'>)}) (C {(test_refspec)} {(fetch)} {(SQ )}) (C {(test_refspec)} {(fetch)} {(SQ <':'>)}) (C {(test_refspec)} {(fetch)} {(SQ <'::'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/*:refs/remotes/frotz/*'>)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/*:refs/remotes/frotz'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads:refs/remotes/frotz/*'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/master:refs/remotes/frotz/xyzzy'>)}) (C {(Lit_Other ':')} {(test_refspec)} {(push)} {(SQ <'refs/heads/master::refs/remotes/frotz/xyzzy'>)} {(invalid)} ) (C {(Lit_Other ':')} {(test_refspec)} {(push)} {(SQ <'refs/heads/maste :refs/remotes/frotz/xyzzy'>)} {(invalid)} ) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/*:refs/remotes/frotz/*'>)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/*:refs/remotes/frotz'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads:refs/remotes/frotz/*'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/master:refs/remotes/frotz/xyzzy'>)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/master::refs/remotes/frotz/xyzzy'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/maste :refs/remotes/frotz/xyzzy'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'master~1:refs/remotes/frotz/backup'>)}) (C {(test_refspec)} {(fetch)} {(SQ <'master~1:refs/remotes/frotz/backup'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'HEAD~4:refs/remotes/frotz/new'>)}) (C {(test_refspec)} {(fetch)} {(SQ <'HEAD~4:refs/remotes/frotz/new'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <HEAD>)}) (C {(test_refspec)} {(fetch)} {(SQ <HEAD>)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/ nitfol'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/ nitfol'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'HEAD:'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'HEAD:'>)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/ nitfol:'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/ nitfol:'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <':refs/remotes/frotz/deleteme'>)}) (C {(test_refspec)} {(fetch)} {(SQ <':refs/remotes/frotz/HEAD-to-me'>)}) (C {(test_refspec)} {(push)} {(SQ <':refs/remotes/frotz/delete me'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <':refs/remotes/frotz/HEAD to me'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/*/for-linus:refs/remotes/mine/*-blah'>)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/*/for-linus:refs/remotes/mine/*-blah'>)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads*/for-linus:refs/remotes/mine/*'>)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads*/for-linus:refs/remotes/mine/*'>)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/*/*/for-linus:refs/remotes/mine/*'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/*/*/for-linus:refs/remotes/mine/*'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/*g*/for-linus:refs/remotes/mine/*'>)} {(invalid)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/*g*/for-linus:refs/remotes/mine/*'>)} {(invalid)}) (C {(test_refspec)} {(fetch)} {(SQ <'refs/heads/*/for-linus:refs/remotes/mine/*'>)}) (C {(test_refspec)} {(push)} {(SQ <'refs/heads/*/for-linus:refs/remotes/mine/*'>)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:good) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(printf)} {(SQ <'\\303\\204'>)})]) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(test_refspec)} {(fetch)} {(DQ (refs/heads/) (${ VSub_Name good))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:bad) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(printf)} {(SQ <'\\011tab'>)})]) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(test_refspec)} {(fetch)} {(DQ (refs/heads/) (${ VSub_Name bad))} {(invalid)}) (C {(test_done)}) ] )