From 297b534daf7df7f22529ff091a6f40543a2d2b75 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Fri, 19 Jul 2024 23:46:14 +0200 Subject: [PATCH] DiskUtilsTests: canonicalize the temp path on macOS for further comparisons --- TruePath.Tests/DiskUtilsTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TruePath.Tests/DiskUtilsTests.cs b/TruePath.Tests/DiskUtilsTests.cs index eef8ea9..07d6181 100644 --- a/TruePath.Tests/DiskUtilsTests.cs +++ b/TruePath.Tests/DiskUtilsTests.cs @@ -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; @@ -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.""");