mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-27 17:24:26 -05:00
Avoid unnecessary indents for compount boolean expressions (#246)
- Avoid incrementing indents for compound binary boolean expressions. Multiple 'AND x = Y' statements were each indenting instead of having the same indent level. - Fixes https://github.com/Microsoft/vscode-mssql/issues/709
This commit is contained in:
@@ -19,6 +19,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Formatter
|
||||
new FormatOptions() { KeywordCasing = CasingOptions.Uppercase },
|
||||
verifyFormat: true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void KeywordCaseConversionLowercase()
|
||||
{
|
||||
@@ -28,5 +29,25 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Formatter
|
||||
new FormatOptions() { KeywordCasing = CasingOptions.Lowercase },
|
||||
verifyFormat: true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SelectWithOrderByShouldCorrectlyIndent()
|
||||
{
|
||||
LoadAndFormatAndCompare("SelectWithOrderByShouldCorrectlyIndent",
|
||||
GetInputFile("SelectWithOrderBy.sql"),
|
||||
GetBaselineFile("SelectWithOrderBy_CorrectIndents.sql"),
|
||||
new FormatOptions(),
|
||||
verifyFormat: true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SelectStatementShouldCorrectlyIndent()
|
||||
{
|
||||
LoadAndFormatAndCompare("SelectStatementShouldCorrectlyIndent",
|
||||
GetInputFile("CreateProcedure.sql"),
|
||||
GetBaselineFile("CreateProcedure_CorrectIndents.sql"),
|
||||
new FormatOptions(),
|
||||
verifyFormat: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user