Add a test for using with trailing newline

I couldn't find a test like this, but I've been debugging an issue in this
scenario.
This commit is contained in:
Ryan Nowak 2016-12-30 16:06:18 -08:00
parent 0889067652
commit f45afb6c19
1 changed files with 10 additions and 0 deletions

View File

@ -465,6 +465,16 @@ while(true);", BlockType.Statement, SpanKind.Code, acceptedCharacters: AcceptedC
.Accepts(AcceptedCharacters.NonWhiteSpace | AcceptedCharacters.WhiteSpace)));
}
[Fact]
public void ParseBlockCapturesNewlineAfterUsing()
{
ParseBlockTest($"using Foo{Environment.NewLine}",
new DirectiveBlock(
Factory.Code($"using Foo{Environment.NewLine}")
.AsNamespaceImport(" Foo")
.Accepts(AcceptedCharacters.NonWhiteSpace | AcceptedCharacters.WhiteSpace)));
}
[Fact]
public void ParseBlockParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat()
{