Skip to content

Commit

Permalink
Merge pull request #1128 from nunit/issue-1026
Browse files Browse the repository at this point in the history
Fix test so it runs under Linux
  • Loading branch information
CharliePoole authored Feb 6, 2022
2 parents b348f4e + 79a5835 commit 96fb91b
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,18 @@ public void RelativePath()
@"c:\folder1", @"C:\Folder2\folder3"), Is.EqualTo(@"..\Folder2\folder3"));
}


[Test]
[Platform("win")] // Issue #1026 created to make this run under netcoreapp2.1/Linux again
public void SamePathOrUnder()
public void SamePathOrUnder()
{
Assert.SamePathOrUnder( @"C:\folder1\folder2\folder3", @"c:\folder1\.\folder2\junk\..\folder3" );
Assert.SamePathOrUnder( @"C:\folder1\folder2\", @"c:\folder1\.\folder2\junk\..\folder3" );
Assert.SamePathOrUnder( @"C:\folder1\folder2", @"c:\folder1\.\folder2\junk\..\folder3" );
Assert.SamePathOrUnder( @"C:\folder1\folder2", @"c:\folder1\.\Folder2\junk\..\folder3" );
Assert.NotSamePathOrUnder( @"C:\folder1\folder2", @"c:\folder1\.\folder22\junk\..\folder3" );
Assert.SamePathOrUnder( @"C:\folder1\folder2\folder3", @"C:\folder1\.\folder2\junk\..\folder3" );
Assert.SamePathOrUnder( @"C:\folder1\folder2\", @"C:\folder1\.\folder2\junk\..\folder3" );
Assert.SamePathOrUnder( @"C:\folder1\folder2", @"C:\folder1\.\folder2\junk\..\folder3" );
Assert.NotSamePathOrUnder( @"C:\folder1\folder2", @"C:\folder1\.\folder22\junk\..\folder3" );
Assert.NotSamePathOrUnder( @"C:\folder1\folder2ile.tmp", @"D:\folder1\.\folder2\folder3\file.tmp" );
Assert.NotSamePathOrUnder( @"C:\", @"D:\" );
Assert.SamePathOrUnder( @"C:\", @"c:\" );
Assert.SamePathOrUnder( @"C:\", @"c:\bin\debug" );
Assert.SamePathOrUnder( @"C:\", @"C:\" );
Assert.SamePathOrUnder( @"C:\", @"C:\bin\debug" );

}
}
Expand Down

0 comments on commit 96fb91b

Please sign in to comment.