Updated the test TagHelperBlockRewriteTest class
This commit is contained in:
parent
0af42204eb
commit
6885fb15d0
|
|
@ -2950,7 +2950,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
intType),
|
intType),
|
||||||
RazorDiagnosticFactory.CreateParsing_TagHelperIndexerAttributeNameMustIncludeKey(
|
RazorDiagnosticFactory.CreateParsing_TagHelperIndexerAttributeNameMustIncludeKey(
|
||||||
new SourceSpan(7, 0, 7, 11),
|
new SourceSpan(7, 0, 7, 11),
|
||||||
"int-prefix-",
|
"int-prefix-",
|
||||||
"input"),
|
"input"),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -2973,7 +2973,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
stringType),
|
stringType),
|
||||||
RazorDiagnosticFactory.CreateParsing_TagHelperIndexerAttributeNameMustIncludeKey(
|
RazorDiagnosticFactory.CreateParsing_TagHelperIndexerAttributeNameMustIncludeKey(
|
||||||
new SourceSpan(7, 0, 7, 14),
|
new SourceSpan(7, 0, 7, 14),
|
||||||
"string-prefix-",
|
"string-prefix-",
|
||||||
"input"),
|
"input"),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -3638,7 +3638,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
RazorDiagnosticFactory.CreateTagHelper_EmptyBoundAttribute(
|
RazorDiagnosticFactory.CreateTagHelper_EmptyBoundAttribute(
|
||||||
new SourceSpan(7, 0, 7, 21),
|
new SourceSpan(7, 0, 7, 21),
|
||||||
"bound-required-string",
|
"bound-required-string",
|
||||||
"input",
|
"input",
|
||||||
stringType),
|
stringType),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -3962,7 +3962,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
.Build(),
|
.Build(),
|
||||||
};
|
};
|
||||||
|
|
||||||
var featureFlags = new TestRazorParserFeatureFlags(allowMinimizedBooleanTagHelperAttributes: false);
|
var featureFlags = new TestRazorParserFeatureFlags(allowMinimizedBooleanTagHelperAttributes: false, allowHtmlCommentsInTagHelper: false);
|
||||||
|
|
||||||
var expectedOutput = new MarkupBlock(
|
var expectedOutput = new MarkupBlock(
|
||||||
new MarkupTagHelperBlock(
|
new MarkupTagHelperBlock(
|
||||||
|
|
@ -3994,12 +3994,15 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
||||||
|
|
||||||
private class TestRazorParserFeatureFlags : RazorParserFeatureFlags
|
private class TestRazorParserFeatureFlags : RazorParserFeatureFlags
|
||||||
{
|
{
|
||||||
public TestRazorParserFeatureFlags(bool allowMinimizedBooleanTagHelperAttributes)
|
public TestRazorParserFeatureFlags(bool allowMinimizedBooleanTagHelperAttributes, bool allowHtmlCommentsInTagHelper)
|
||||||
{
|
{
|
||||||
AllowMinimizedBooleanTagHelperAttributes = allowMinimizedBooleanTagHelperAttributes;
|
AllowMinimizedBooleanTagHelperAttributes = allowMinimizedBooleanTagHelperAttributes;
|
||||||
|
AllowHtmlCommentsInTagHelpers = allowHtmlCommentsInTagHelper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool AllowMinimizedBooleanTagHelperAttributes { get; }
|
public override bool AllowMinimizedBooleanTagHelperAttributes { get; }
|
||||||
|
|
||||||
|
public override bool AllowHtmlCommentsInTagHelpers { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue