-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update OmniSharp and some fixes (#67)
- Loading branch information
1 parent
52d079f
commit 57cfb7d
Showing
13 changed files
with
65 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
...ditorServicesCommandSuite.EditorServices/EditorServicesCommandSuite.EditorServices.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletions
10
src/EditorServicesCommandSuite/EditorServicesCommandSuite.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="..\EditorServicesCommandSuite.Common.props" /> | ||
<PropertyGroup> | ||
<RestoreAdditionalProjectSources> | ||
$(RestoreAdditionalProjectSources) | ||
https://www.myget.org/F/omnisharp/api/v3/index.json | ||
</RestoreAdditionalProjectSources> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" /> | ||
<PackageReference Include="System.Buffers" Version="4.5.1" /> | ||
<PackageReference Include="System.Memory" Version="4.5.4" /> | ||
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="0.17.0-*" PrivateAssets="all" /> | ||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0" /> | ||
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="0.19.2" PrivateAssets="all" /> | ||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,31 @@ public class CommandSplatTests | |
{ | ||
private readonly MockedRefactorService _refactorService = new MockedRefactorService(new CommandSplatRefactor(null)); | ||
|
||
[Fact] | ||
public async void HandlesStrangeJoinStringParameterBindingException() | ||
{ | ||
// See https://github.com/SeeminglyScience/EditorServicesCommandSuite/issues/62 | ||
Assert.Equal( | ||
TestBuilder.Create() | ||
.Lines("$splat = @{") | ||
.Lines(" OutputPrefix = '-'") | ||
.Lines("}") | ||
.Texts("Join-String @splat"), | ||
await GetRefactoredTextAsync("Join-String -OutputPrefix '-'")); | ||
} | ||
|
||
[Fact] | ||
public async void PerservesExplicitSwitchValues() | ||
{ | ||
Assert.Equal( | ||
TestBuilder.Create() | ||
.Lines("$splat = @{") | ||
.Lines(" Verbose = $Test.IsPresent") | ||
.Lines("}") | ||
.Texts("Get-ChildItem @splat"), | ||
await GetRefactoredTextAsync("Get-ChildItem -Verbose:$Test.IsPresent")); | ||
} | ||
|
||
[Fact] | ||
public async void DoesNothingWithNoParameters() | ||
{ | ||
|
@@ -91,7 +116,8 @@ public async void AllParameters_HandlesParameterSet_OneParamSet() | |
.Lines(" From = $mandatoryStringFrom") | ||
.Lines(" SmtpServer = $stringSmtpServer") | ||
.Lines(" Priority = $mailPriorityPriority") | ||
.Lines(" Subject = $mandatoryStringSubject") | ||
.Lines(" ReplyTo = $stringArrayReplyTo") | ||
.Lines(" Subject = $stringSubject") | ||
.Lines(" To = $mandatoryStringArrayTo") | ||
.Lines(" Credential = $pSCredentialCredential") | ||
.Lines(" UseSsl = $switchParameterUseSsl") | ||
|
@@ -119,7 +145,8 @@ public async void AllParameters_HandlesParameterSet_OneParamSet_OneParamGiven() | |
.Lines(" DeliveryNotificationOption = $deliveryNotificationOptionsDeliveryNotificationOption") | ||
.Lines(" SmtpServer = $stringSmtpServer") | ||
.Lines(" Priority = $mailPriorityPriority") | ||
.Lines(" Subject = $mandatoryStringSubject") | ||
.Lines(" ReplyTo = $stringArrayReplyTo") | ||
.Lines(" Subject = $stringSubject") | ||
.Lines(" To = $mandatoryStringArrayTo") | ||
.Lines(" Credential = $pSCredentialCredential") | ||
.Lines(" UseSsl = $switchParameterUseSsl") | ||
|
@@ -264,7 +291,6 @@ public async void MandatoryParameters_HandlesParameterSet_OneParamSet() | |
TestBuilder.Create() | ||
.Lines("$splat = @{") | ||
.Lines(" From = $mandatoryStringFrom") | ||
.Lines(" Subject = $mandatoryStringSubject") | ||
.Lines(" To = $mandatoryStringArrayTo") | ||
.Lines("}") | ||
.Texts("Send-MailMessage @splat"), | ||
|
@@ -280,7 +306,6 @@ public async void MandatoryParameters_HandlesParameterSet_OneParamSet_OneParamGi | |
TestBuilder.Create() | ||
.Lines("$splat = @{") | ||
.Lines(" From = '[email protected]'") | ||
.Lines(" Subject = $mandatoryStringSubject") | ||
.Lines(" To = $mandatoryStringArrayTo") | ||
.Lines("}") | ||
.Texts("Send-MailMessage @splat"), | ||
|
@@ -383,7 +408,6 @@ public async void NoHints_HandlesParameterSet_OneParamSet() | |
TestBuilder.Create() | ||
.Lines("$splat = @{") | ||
.Lines(" From = $from") | ||
.Lines(" Subject = $subject") | ||
.Lines(" To = $to") | ||
.Lines("}") | ||
.Texts("Send-MailMessage @splat"), | ||
|
@@ -419,7 +443,7 @@ private async Task<string> GetRefactoredTextAsync( | |
testString, | ||
context => CommandSplatRefactor.SplatCommandAsync( | ||
context, | ||
context.Ast.FindParent<CommandAst>(), | ||
context.Ast.FindParent<CommandAst>(maxDepth: 10), | ||
includedTypes, | ||
null), | ||
cancellationToken: cancellationToken, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters