Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace OmniSharp.Roslyn.CSharp.Services.Intellisense
{
[Obsolete("Please use CompletionService.")]
[OmniSharpHandler(OmniSharpEndpoints.AutoComplete, LanguageNames.CSharp)]
public class IntellisenseService : IRequestHandler<AutoCompleteRequest, IEnumerable<AutoCompleteResponse>>
{
Expand Down
27 changes: 27 additions & 0 deletions tests/OmniSharp.Roslyn.CSharp.Tests/IntellisenseFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,33 @@ void M()
Assert.Contains(@"The ""G"" standard format specifier", gStandardCompletion.Description);
}

[ConditionalTheory(typeof(WindowsOnly))]
[InlineData("dummy.cs")]
[InlineData("dummy.csx")]
public async Task Embedded_language_completion_provider_for_regex(string filename)
{
const string source = @"
using System;
using System.Text.RegularExpressions;
class C
{
void M()
{
var r = Regex.Match(""foo"", ""$$""
}
}
";

var completions = await FindCompletionsAsync(filename, source);

Assert.NotEmpty(completions);

var wCompletion = completions.FirstOrDefault(x => x.CompletionText == @"\w");
Assert.NotNull(wCompletion);
Assert.Equal("word character", wCompletion.DisplayText);
Assert.Contains(@"matches any word character", wCompletion.Description);
}

[Fact]
public async Task Scripting_by_default_returns_completions_for_CSharp7_1()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net472</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<WarningsNotAsErrors>CS0618</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down