Skip to content

Commit

Permalink
Make multiple push spec test more complete
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Feb 2, 2017
1 parent 28e3f44 commit 82ef1ae
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions test/TabExpansion.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,23 @@ Describe 'TabExpansion Tests' {
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags +HEAD:ma'
$result | Should BeExactly '+HEAD:master'
}
It 'Tab completes matching multiple ref:branch with intermixed parameters' {
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags :master HEAD:ma'
It 'Tab completes matching multiple push ref specs with intermixed parameters' {
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags one :two three:four ma'
$result | Should BeExactly 'master'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags one :two three:four --crazy-param ma'
$result | Should BeExactly 'master'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags one :two three:four HEAD:ma'
$result | Should BeExactly 'HEAD:master'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags :master --crazy-param HEAD:ma'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags one :two three:four --crazy-param HEAD:ma'
$result | Should BeExactly 'HEAD:master'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags :master +HEAD:ma'

$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags one :two three:four +ma'
$result | Should BeExactly '+master'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags one :two three:four --crazy-param +ma'
$result | Should BeExactly '+master'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags one :two three:four +HEAD:ma'
$result | Should BeExactly '+HEAD:master'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags :master --crazy-param +HEAD:ma'
$result = & $module GitTabExpansionInternal 'git push -u origin --follow-tags one :two three:four --crazy-param +HEAD:ma'
$result | Should BeExactly '+HEAD:master'
}
It 'Tab complete returns empty result for missing remote' {
Expand Down

0 comments on commit 82ef1ae

Please sign in to comment.