зеркало из https://github.com/dotnet/razor.git
Add failing and passing tests
This commit is contained in:
Родитель
9b4b496f60
Коммит
5082877620
|
@ -1014,6 +1014,48 @@ expected: @"@page ""/counter""
|
|||
tagHelpers: GetComponentWithTwoCascadingTypeParameter());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[CombinatorialData]
|
||||
public async Task Formats_MultilineExpressionAtStartOfBlock(bool useSourceTextDiffer)
|
||||
{
|
||||
await RunFormattingTestAsync(useSourceTextDiffer: useSourceTextDiffer,
|
||||
input: @"
|
||||
@{
|
||||
var x = DateTime
|
||||
.Now
|
||||
.ToString();
|
||||
}
|
||||
",
|
||||
expected: @"@{
|
||||
var x = DateTime
|
||||
.Now
|
||||
.ToString();
|
||||
}
|
||||
");
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[CombinatorialData]
|
||||
public async Task Formats_MultilineExpressionNotAtStartOfBlock(bool useSourceTextDiffer)
|
||||
{
|
||||
await RunFormattingTestAsync(useSourceTextDiffer: useSourceTextDiffer,
|
||||
input: @"
|
||||
@{
|
||||
//
|
||||
var x = DateTime
|
||||
.Now
|
||||
.ToString();
|
||||
}
|
||||
",
|
||||
expected: @"@{
|
||||
//
|
||||
var x = DateTime
|
||||
.Now
|
||||
.ToString();
|
||||
}
|
||||
");
|
||||
}
|
||||
|
||||
private IReadOnlyList<TagHelperDescriptor> GetComponentWithCascadingTypeParameter()
|
||||
{
|
||||
var input = @"
|
||||
|
|
Загрузка…
Ссылка в новой задаче