diff --git a/src/EditorFeatures/CSharpTest/DocumentationComments/DocumentationCommentTests.cs b/src/EditorFeatures/CSharpTest/DocumentationComments/DocumentationCommentTests.cs
index f7eab157089e8e50ceb16b9ac0ec5755a8a76d61..c0a08df2993363d7d93e59706c0386c2120d7928 100644
--- a/src/EditorFeatures/CSharpTest/DocumentationComments/DocumentationCommentTests.cs
+++ b/src/EditorFeatures/CSharpTest/DocumentationComments/DocumentationCommentTests.cs
@@ -1398,6 +1398,36 @@ void M()
VerifyOpenLineAbove(code, expected);
}
+ [WorkItem(2090, "https://github.com/dotnet/roslyn/issues/2090")]
+ [Fact, Trait(Traits.Feature, Traits.Features.DocumentationComments)]
+ public void TestOpenLineAbove3()
+ {
+ const string code =
+@"class C
+{
+ /// $$
+ /// stuff
+ ///
+ void M()
+ {
+ }
+}";
+
+ const string expected =
+@"class C
+{
+ $$
+ ///
+ /// stuff
+ ///
+ void M()
+ {
+ }
+}";
+
+ VerifyOpenLineAbove(code, expected);
+ }
+
[WorkItem(2090, "https://github.com/dotnet/roslyn/issues/2090")]
[Fact, Trait(Traits.Feature, Traits.Features.DocumentationComments)]
public void TestOpenLineBelow1()
@@ -1458,6 +1488,26 @@ void M()
VerifyOpenLineBelow(code, expected);
}
+ [WorkItem(2090, "https://github.com/dotnet/roslyn/issues/2090")]
+ [Fact, Trait(Traits.Feature, Traits.Features.DocumentationComments)]
+ public void TestOpenLineBelow3()
+ {
+ const string code =
+@"///
+/// stuff
+/// $$
+";
+
+ const string expected =
+@"///
+/// stuff
+///
+/// $$
+";
+
+ VerifyOpenLineBelow(code, expected);
+ }
+
protected override char DocumentationCommentCharacter
{
get { return '/'; }
diff --git a/src/EditorFeatures/VisualBasicTest/DocumentationComments/DocumentationCommentTests.vb b/src/EditorFeatures/VisualBasicTest/DocumentationComments/DocumentationCommentTests.vb
index a7daadc7b3b8db0725e08151233586b4c9774ee1..a07564d7ed2b7a8b2c48ffb1f32b0e4386281392 100644
--- a/src/EditorFeatures/VisualBasicTest/DocumentationComments/DocumentationCommentTests.vb
+++ b/src/EditorFeatures/VisualBasicTest/DocumentationComments/DocumentationCommentTests.vb
@@ -784,6 +784,31 @@ End Class
VerifyOpenLineAbove(code, expected)
End Sub
+
+
+ Public Sub TestOpenLineAbove3()
+ Const code = "
+Class C
+ ''' $$
+ ''' stuff
+ '''
+ Sub M()
+ End Sub
+End Class
+"
+ Const expected = "
+Class C
+ $$
+ '''
+ ''' stuff
+ '''
+ Sub M()
+ End Sub
+End Class
+"
+ VerifyOpenLineAbove(code, expected)
+ End Sub
+
Public Sub TestOpenLineBelow1()
@@ -834,6 +859,21 @@ End Class
VerifyOpenLineBelow(code, expected)
End Sub
+
+
+ Public Sub TestOpenLineBelow3()
+ Const code = "
+'''
+''' stuff
+''' $$"
+ Const expected = "
+'''
+''' stuff
+'''
+''' $$"
+ VerifyOpenLineBelow(code, expected)
+ End Sub
+
Friend Overrides Function CreateCommandHandler(
waitIndicator As IWaitIndicator,
undoHistoryRegistry As ITextUndoHistoryRegistry,