提交 c243da1e 编写于 作者: A Allison Chou

Added test and comment

上级 05e4c24c
......@@ -81,6 +81,9 @@ public bool ExecuteCommandWorker(ReturnKeyCommandArgs args)
}
// We now go through the verified string literals and split each of them.
// The list of spans is traversed in reverse order so we do not have to
// deal with updating later caret positions to account for the added space
// from splitting earlier caret positions.
foreach (var span in spans.Reverse())
{
if (!SplitString(textView, subjectBuffer, span.Start))
......
......@@ -801,6 +801,35 @@ void M()
""[||]the ti"" +
""[||]me"";
}
}");
}
[WorkItem(39040, "https://github.com/dotnet/roslyn/issues/39040")]
[WpfFact, Trait(Traits.Feature, Traits.Features.SplitStringLiteral)]
public void TestMultiCaretInterpolatedString()
{
TestHandled(
@"class C
{
string s = ""hello w[||]orld"";
void M()
{
var location = ""world"";
var s = $""H[||]ello {location}!"";
}
}",
@"class C
{
string s = ""hello w"" +
""[||]orld"";
void M()
{
var location = ""world"";
var s = $""H"" +
$""[||]ello {location}!"";
}
}");
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册