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:
parent
0889067652
commit
f45afb6c19
|
|
@ -465,6 +465,16 @@ while(true);", BlockType.Statement, SpanKind.Code, acceptedCharacters: AcceptedC
|
||||||
.Accepts(AcceptedCharacters.NonWhiteSpace | AcceptedCharacters.WhiteSpace)));
|
.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]
|
[Fact]
|
||||||
public void ParseBlockParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat()
|
public void ParseBlockParsesNamespaceAliasWithSemicolonForUsingKeywordIfIsInValidFormat()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue