public async Task TestEnterSelectionBehaviorAsync() { using (var data = await Create("\tfirst\n<-\tsecond\n->$\tthird")) { EditActions.InsertNewLine(data.Document.Editor); CheckOutput(data, "\tfirst\n\t$third"); } }
public async Task TestBug15335Async() { using (var data = await Create("namespace Foo\n{\n\tpublic class Bar\n\t{\n\t\tvoid Test()\r\n\t\t{\r\n\t\t\t/* foo$\n\t\t}\n\t}\n}\n")) { EditActions.InsertNewLine(data.Document.Editor); CheckOutput(data, "namespace Foo\n{\n\tpublic class Bar\n\t{\n\t\tvoid Test()\r\n\t\t{\r\n\t\t\t/* foo\n\t\t\t * $\n\t\t}\n\t}\n}\n"); } }
public async Task TestMultiLineCommentContinuationAsync() { using (var data = await Create("\t\t/*$" + eolMarker + "\t\tclass Foo {}")) { EditActions.InsertNewLine(data.Document.Editor); CheckOutput(data, "\t\t/*" + eolMarker + "\t\t * $" + eolMarker + "\t\tclass Foo {}"); } }
public async Task TestBug3214Async() { using (var data = await Create("\"Hello\n\t$")) { EditActions.InsertNewLine(data.Document.Editor); CheckOutput(data, "\"Hello\n\t" + eolMarker + "\t$"); } }
public void TestBug15335() { var data = Create("namespace Foo\n{\n\tpublic class Bar\n\t{\n\t\tvoid Test()\r\n\t\t{\r\n\t\t\t/* foo$\n\t\t}\n\t}\n}\n").Data; EditActions.InsertNewLine(data); CheckOutput(data, "namespace Foo\n{\n\tpublic class Bar\n\t{\n\t\tvoid Test()\r\n\t\t{\r\n\t\t\t/* foo\n\t\t\t * $\n\t\t}\n\t}\n}\n"); }
public void TestMultiLineCommentContinuation() { var data = Create("\t\t/*$" + eolMarker + "\t\tclass Foo {}").Data; EditActions.InsertNewLine(data); CheckOutput(data, "\t\t/*" + eolMarker + "\t\t * $" + eolMarker + "\t\tclass Foo {}"); }
public void TestBug3214() { var data = Create("\"Hello\n\t$"); EditActions.InsertNewLine(data.Data); CheckOutput(data.Data, "\"Hello\n\t" + eolMarker + "\t$"); }
public void TestEnterSelectionBehavior() { var data = Create("\tfirst\n<-\tsecond\n->$\tthird").Data; EditActions.InsertNewLine(data); CheckOutput(data, "\tfirst\n\t$third"); }
public async Task TestBug3214Async() { var data = await Create("\"Hello\n\t$"); EditActions.InsertNewLine(data); CheckOutput(data, "\"Hello\n\t" + eolMarker + "\t$"); }
public async Task TestBug11966Async() { using (var data = await Create("///<summary>This is a long comment $ </summary>")) { EditActions.InsertNewLine(data.Document.Editor); CheckOutput(data, @"///<summary>This is a long comment /// $ </summary>"); } }
public void TestBug11966() { var data = Create("///<summary>This is a long comment $ </summary>").Data; EditActions.InsertNewLine(data); CheckOutput(data, @"///<summary>This is a long comment /// $ </summary>"); }
public async Task TestBug17896Async() { using (var data = await Create("\t\t\"This is a long test string.$ It contains spaces.\"")) { EditActions.InsertNewLine(data.Document.Editor); var engine = new CSharpTextEditorIndentation { wasInStringLiteral = true }; CheckOutput(data, "\t\t\"This is a long test string.\" +" + eolMarker + "\t\t\"$ It contains spaces.\"", engine); } }
public async Task TestStringContinationAsync() { using (var data = await Create("\t\t\"Hello$World\"")) { EditActions.InsertNewLine(data.Document.Editor); var engine = new CSharpTextEditorIndentation { wasInStringLiteral = true }; CheckOutput(data, "\t\t\"Hello\" +" + eolMarker + "\t\t\"$World\"", engine); } }
public void TestBug17896() { var data = Create("\t\t\"This is a long test string.$ It contains spaces.\"").Data; EditActions.InsertNewLine(data); var engine = new CSharpTextEditorIndentation { wasInStringLiteral = true }; CheckOutput(data, "\t\t\"This is a long test string.\" +" + eolMarker + "\t\t\"$ It contains spaces.\"", engine); }
public void TestStringContination() { var data = Create("\t\t\"Hello$World\"").Data; EditActions.InsertNewLine(data); var engine = new CSharpTextEditorIndentation { wasInStringLiteral = true }; CheckOutput(data, "\t\t\"Hello\" +" + eolMarker + "\t\t\"$World\"", engine); }
public async Task TestXmlDocumentContinuationCase2() { using (var data = await Create("\t\t///" + eolMarker + "\t\t/// Hel$lo" + eolMarker + "\t\tclass Foo {}")) { EditActions.InsertNewLine(data.Document.Editor); CheckOutput(data, "\t\t///" + eolMarker + "\t\t/// Hel" + eolMarker + "\t\t/// $lo" + eolMarker + "\t\tclass Foo {}"); } }
public void TestXmlDocumentContinuationCase2() { var data = Create("\t\t///" + eolMarker + "\t\t/// Hel$lo" + eolMarker + "\t\tclass Foo {}").Data; EditActions.InsertNewLine(data); CheckOutput(data, "\t\t///" + eolMarker + "\t\t/// Hel" + eolMarker + "\t\t/// $lo" + eolMarker + "\t\tclass Foo {}"); }
public async Task TestMultiLineCommentContinuationCase3Async() { var data = await Create("\t\t/*" + eolMarker + "\t\t * Hel$lo" + eolMarker + "class Foo {}"); EditActions.InsertNewLine(data); CheckOutput(data, "\t\t/*" + eolMarker + "\t\t * Hel" + eolMarker + "\t\t * $lo" + eolMarker + "class Foo {}"); }
public async Task TestXmlDocumentContinuationAsync() { var data = await Create( "\t\t///" + eolMarker + "\t\t/// Hello$" + eolMarker + "\t\tclass Foo {}" ); EditActions.InsertNewLine(data); CheckOutput(data, "\t\t///" + eolMarker + "\t\t/// Hello" + eolMarker + "\t\t/// $" + eolMarker + "\t\tclass Foo {}"); }
void OnInsertNewLine() { EditActions.InsertNewLine(Editor); }