parent
b34543621f
commit
127e095370
|
|
@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Razor.Compilation.TagHelpers
|
||||||
private IDictionary<string, string> _propertyBag;
|
private IDictionary<string, string> _propertyBag;
|
||||||
private IEnumerable<TagHelperAttributeDescriptor> _attributes =
|
private IEnumerable<TagHelperAttributeDescriptor> _attributes =
|
||||||
Enumerable.Empty<TagHelperAttributeDescriptor>();
|
Enumerable.Empty<TagHelperAttributeDescriptor>();
|
||||||
private IEnumerable<TagHelperRequiredAttributeDescriptor> _requiredAttributes =
|
private IEnumerable<TagHelperRequiredAttributeDescriptor> _requiredAttributes =
|
||||||
Enumerable.Empty<TagHelperRequiredAttributeDescriptor>();
|
Enumerable.Empty<TagHelperRequiredAttributeDescriptor>();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
|
||||||
BaselineWriter.WriteBaseline( baselinePath, result.Code);
|
BaselineWriter.WriteBaseline( baselinePath, result.Code);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Assert.Equal(expectedOutput, result.Code);
|
Assert.Equal(expectedOutput, NormalizeLineEndings(result.Code));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -103,11 +103,11 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[MemberData(nameof(ModifyOutputData))]
|
[MemberData(nameof(ModifyOutputData))]
|
||||||
public void BuildAfterExecuteContent_ModifyChunks_ModifyOutput(
|
public void BuildAfterExecuteContent_ModifyChunks_ModifyOutput(
|
||||||
CSharpCodeGenerator generator,
|
CSharpCodeGenerator generator,
|
||||||
CodeGeneratorResult expectedResult,
|
CodeGeneratorResult expectedResult,
|
||||||
string fileName)
|
string fileName)
|
||||||
{
|
{
|
||||||
|
|
@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
|
||||||
BaselineWriter.WriteBaseline( baselinePath, result.Code);
|
BaselineWriter.WriteBaseline( baselinePath, result.Code);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
Assert.Equal(result.Code, expectedResult.Code);
|
Assert.Equal(expectedResult.Code, NormalizeLineEndings(result.Code));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -212,5 +212,8 @@ namespace Microsoft.AspNetCore.Razor.CodeGenerators
|
||||||
return base.Generate();
|
return base.Generate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string NormalizeLineEndings(string content) =>
|
||||||
|
content.Replace("\r", "").Replace("\n", "\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue