Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace #if !UNIX with [WindowsFact] #654

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/Cake.Core.Tests/Unit/IO/PathCollapserTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Cake.Core.IO;
using Cake.Testing.Xunit;
using Xunit;

namespace Cake.Core.Tests.Unit.IO
Expand Down Expand Up @@ -36,9 +37,8 @@ public void Should_Collapse_Path_With_Separated_Ellipsis()
// Then
Assert.Equal("hello/world", path);
}

#if !UNIX
[Fact]

[WindowsFact]
public void Should_Collapse_Path_With_Windows_Root()
{
// Given, When
Expand All @@ -47,7 +47,6 @@ public void Should_Collapse_Path_With_Windows_Root()
// Then
Assert.Equal("c:/hello/world", path);
}
#endif

[Fact]
public void Should_Collapse_Path_With_Non_Windows_Root()
Expand All @@ -58,9 +57,8 @@ public void Should_Collapse_Path_With_Non_Windows_Root()
// Then
Assert.Equal("/hello/world", path);
}

#if !UNIX
[Fact]

[WindowsFact]
public void Should_Stop_Collapsing_When_Windows_Root_Is_Reached()
{
// Given, When
Expand All @@ -69,7 +67,6 @@ public void Should_Stop_Collapsing_When_Windows_Root_Is_Reached()
// Then
Assert.Equal("c:/temp", path);
}
#endif

[Fact]
public void Should_Stop_Collapsing_When_Root_Is_Reached()
Expand Down