Fix relative content root path test for non-windows systems

This commit is contained in:
= 2016-03-21 10:56:39 -07:00
parent bb3809d3dc
commit b7bdc9c404
1 changed files with 7 additions and 0 deletions

View File

@ -333,8 +333,15 @@ namespace Microsoft.AspNetCore.Hosting
[Fact]
public void RelativeContentRootIsResolved()
{
var contentRootNet451 = PlatformServices.Default.Runtime.OperatingSystemPlatform == Platform.Windows ?
"testroot" : "../../../../test/Microsoft.AspNetCore.Hosting.Tests/testroot";
var host = new WebHostBuilder()
#if NET451
.UseContentRoot(contentRootNet451)
#else
.UseContentRoot("testroot")
#endif
.UseServer(new TestServer())
.UseStartup("Microsoft.AspNetCore.Hosting.Tests")
.Build();