Fix Travis.
- Fixed test that had newlines but indexes not based on them.
This commit is contained in:
parent
cf1355245f
commit
96f1090ff1
|
|
@ -26,24 +26,25 @@ namespace Microsoft.AspNet.Razor.Test.TagHelpers
|
||||||
var blockFactory = new BlockFactory(factory);
|
var blockFactory = new BlockFactory(factory);
|
||||||
var documentContent = $"<p>{Environment.NewLine} <strong>{Environment.NewLine} Hello" +
|
var documentContent = $"<p>{Environment.NewLine} <strong>{Environment.NewLine} Hello" +
|
||||||
$"{Environment.NewLine} </strong>{Environment.NewLine}</p>";
|
$"{Environment.NewLine} </strong>{Environment.NewLine}</p>";
|
||||||
|
var newLineLength = Environment.NewLine.Length;
|
||||||
var expectedErrors = new[] {
|
var expectedErrors = new[] {
|
||||||
new RazorError(
|
new RazorError(
|
||||||
RazorResources.FormatTagHelperParseTreeRewriter_InvalidNestedTag("strong", "p", "br"),
|
RazorResources.FormatTagHelperParseTreeRewriter_InvalidNestedTag("strong", "p", "br"),
|
||||||
absoluteIndex: 9,
|
absoluteIndex: 7 + newLineLength,
|
||||||
lineIndex: 1,
|
lineIndex: 1,
|
||||||
columnIndex: 9,
|
columnIndex: 9 + newLineLength,
|
||||||
length: 8),
|
length: 8),
|
||||||
new RazorError(
|
new RazorError(
|
||||||
RazorResources.FormatTagHelperParseTreeRewriter_CannotHaveNonTagContent("p", "br"),
|
RazorResources.FormatTagHelperParseTreeRewriter_CannotHaveNonTagContent("p", "br"),
|
||||||
absoluteIndex: 27,
|
absoluteIndex: 23 + newLineLength * 2,
|
||||||
lineIndex: 2,
|
lineIndex: 2,
|
||||||
columnIndex: 27,
|
columnIndex: 23 + newLineLength * 2,
|
||||||
length: 5),
|
length: 5),
|
||||||
new RazorError(
|
new RazorError(
|
||||||
RazorResources.FormatTagHelperParseTreeRewriter_InvalidNestedTag("strong", "p", "br"),
|
RazorResources.FormatTagHelperParseTreeRewriter_InvalidNestedTag("strong", "p", "br"),
|
||||||
absoluteIndex: 38,
|
absoluteIndex: 32 + newLineLength * 3,
|
||||||
lineIndex: 3,
|
lineIndex: 3,
|
||||||
columnIndex: 38,
|
columnIndex: 32 + newLineLength * 3,
|
||||||
length: 9),
|
length: 9),
|
||||||
};
|
};
|
||||||
var expectedOutput = new MarkupBlock(
|
var expectedOutput = new MarkupBlock(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue