Merge pull request #379 from aspnet/release/2.1
Fix BOM test paths for Unix (#377)
This commit is contained in:
commit
f036a26988
|
|
@ -10,6 +10,7 @@ namespace Templates.Test
|
||||||
public class ByteOrderMarkTest
|
public class ByteOrderMarkTest
|
||||||
{
|
{
|
||||||
private readonly ITestOutputHelper _output;
|
private readonly ITestOutputHelper _output;
|
||||||
|
private readonly char _separator = Path.DirectorySeparatorChar;
|
||||||
|
|
||||||
public ByteOrderMarkTest(ITestOutputHelper output)
|
public ByteOrderMarkTest(ITestOutputHelper output)
|
||||||
{
|
{
|
||||||
|
|
@ -17,14 +18,16 @@ namespace Templates.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(@"\Microsoft.AspNetCore.SpaTemplates\content")]
|
[InlineData("Microsoft.AspNetCore.SpaTemplates")]
|
||||||
[InlineData(@"\Microsoft.DotNet.Web.ProjectTemplates\content")]
|
[InlineData("Microsoft.DotNet.Web.ProjectTemplates")]
|
||||||
[InlineData(@"\Microsoft.DotNet.Web.Spa.ProjectTemplates\content")]
|
[InlineData("Microsoft.DotNet.Web.Spa.ProjectTemplates")]
|
||||||
public void CheckForByteOrderMarkSpaTemplates(string path)
|
public void CheckForByteOrderMarkSpaTemplates(string projectType)
|
||||||
{
|
{
|
||||||
var currentDirectory = Directory.GetCurrentDirectory();
|
var currentDirectory = Directory.GetCurrentDirectory();
|
||||||
var srcDirectory = Path.GetFullPath(Path.Combine(currentDirectory, @"..\..\..\..\..\src"));
|
var repositoryPath = Directory.GetParent(currentDirectory).Parent.Parent.Parent.Parent.FullName;
|
||||||
var directories = Directory.GetDirectories(srcDirectory + path, "*Sharp");
|
var srcDirectory = Path.Combine(repositoryPath, "src");
|
||||||
|
var path = Path.Combine(projectType, "content");
|
||||||
|
var directories = Directory.GetDirectories(Path.Combine(srcDirectory, path), "*Sharp");
|
||||||
|
|
||||||
var filesWithBOMCharactersPresent = false;
|
var filesWithBOMCharactersPresent = false;
|
||||||
foreach (var directory in directories)
|
foreach (var directory in directories)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue