Skip to content

Commit

Permalink
DiskUtilsTests: canonicalize the temp path on macOS for further compa…
Browse files Browse the repository at this point in the history
…risons
  • Loading branch information
ForNeVeR committed Jul 19, 2024
1 parent 031c951 commit 297b534
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TruePath.Tests/DiskUtilsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class DiskUtilsTests
[Fact]
public void DiskUtils_PassBackPath_ReturnCanonicalPath()
{
var tempPath = new AbsolutePath(Path.GetTempPath());
var tempPath = new AbsolutePath(Path.GetTempPath()).Canonicalize();
var expected = tempPath.Value;
var nonCanonicalPath = (tempPath / "foobar" / "..").Value;

Expand All @@ -29,7 +29,7 @@ public void DiskUtils_OnCaseInsensitiveFs_PassNonCanonicalPath_ReturnCanonicalPa
// Arrange
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) return;

var expected = new AbsolutePath(Path.GetTempPath());
var expected = new AbsolutePath(Path.GetTempPath()).Canonicalize();
Assert.True(
expected.Value.Split(Path.DirectorySeparatorChar)[1].Length > 0,
$"""There should be at least one directory in the temporary path "{expected}" for this test.""");
Expand Down

0 comments on commit 297b534

Please sign in to comment.