Skip to content

Commit

Permalink
Add test for symbolic ref
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Mar 27, 2022
1 parent 2f2bfad commit 6dc6d65
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/TabExpansion.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,22 @@ Describe 'TabExpansion Tests' {
&$gitbin branch -D $branchName
}
}

It 'Tab completes branch names that are symbolic refs' {
$branchName = 'symbolic-ref--for-Pester-tests'
if (&$gitbin branch --list -q $branchName) {
&$gitbin branch -D $branchName
}

&$gitbin symbolic-ref refs/heads/$branchName refs/heads/master
try {
$result = & $module GitTabExpansionInternal 'git checkout symbolic-ref--for-Pester-test'
$result | Should -BeExactly $branchName
}
finally {
&$gitbin branch -D $branchName
}
}
}

Context 'Restore Source Branch TabExpansion Tests' {
Expand Down

0 comments on commit 6dc6d65

Please sign in to comment.