Skip to content

Commit 7ab0899

Browse files
authored
#52851 Enable/ Skip test case on MacCatalyst (#74070)
1 parent 519d1e3 commit 7ab0899

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public static partial class PlatformDetection
4343
public static bool IsiOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS"));
4444
public static bool IstvOS => RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS"));
4545
public static bool IsMacCatalyst => RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"));
46+
public static bool IsNotMacCatalyst => !IsMacCatalyst;
4647
public static bool Isillumos => RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"));
4748
public static bool IsSolaris => RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"));
4849
public static bool IsBrowser => RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));

src/libraries/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ protected override void Dispose(bool disposing)
2323
base.Dispose(disposing);
2424
}
2525

26-
// On OSX, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current
26+
// On OSX/MacCatalyst, the temp directory /tmp/ is a symlink to /private/tmp, so setting the current
2727
// directory to a symlinked path will result in GetCurrentDirectory returning the absolute
2828
// path that followed the symlink.
29-
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX))]
29+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX), nameof(PlatformDetection.IsNotMacCatalyst))]
3030
[ActiveIssue("https://github.com/dotnet/runtime/issues/50572", TestPlatforms.Android)]
31-
[ActiveIssue("https://github.com/dotnet/runtime/issues/52851", TestPlatforms.MacCatalyst)]
3231
public void ChDir()
3332
{
3433
var savedDirectory = System.IO.Directory.GetCurrentDirectory();
@@ -86,7 +85,6 @@ static string getString(string fileName)
8685
// Can't get current directory on OSX before setting it.
8786
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotOSX))]
8887
[ActiveIssue("https://github.com/dotnet/runtime/issues/50572", TestPlatforms.Android)]
89-
[ActiveIssue("https://github.com/dotnet/runtime/issues/52851", TestPlatforms.MacCatalyst)]
9088
public void CurDir()
9189
{
9290
Assert.Equal(FileSystem.CurDir(), System.IO.Directory.GetCurrentDirectory());

0 commit comments

Comments
 (0)