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

#51371 fixed failing test in iossimulator #63877

Merged
merged 18 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Runtime.InteropServices;
using Xunit;
using System.Linq;
using Microsoft.DotNet.XUnitExtensions;

namespace System.IO.Tests
{
Expand Down Expand Up @@ -697,11 +698,16 @@ public void WindowsSearchPatternWhitespace()
Assert.Empty(GetEntries(TestDirectory, "\t"));
}

[Fact]
[ConditionalFact]
[PlatformSpecific(CaseSensitivePlatforms)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51371", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void SearchPatternCaseSensitive()
{
if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good idea.

|| RuntimeInformation.RuntimeIdentifier.StartsWith("tvossimulator"))
{
throw new SkipTestException("iOS/tvOS simulators run on a macOS host and are subject to the same case sensitivity behavior.");
}

DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath());
string testBase = GetTestFileName();
testDir.CreateSubdirectory(testBase + "aBBb");
Expand Down
11 changes: 9 additions & 2 deletions src/libraries/System.IO.FileSystem/tests/File/Create.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Linq;
using System.Runtime.InteropServices;
using Xunit;
using Microsoft.DotNet.XUnitExtensions;

namespace System.IO.Tests
{
Expand Down Expand Up @@ -217,11 +219,16 @@ public void LongFileName()
Assert.False(File.Exists(path));
}

[Fact]
[ConditionalFact]
[PlatformSpecific(CaseSensitivePlatforms)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to expand upon CaseSensitivePlatforms?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expanded IsCaseSensitiveOS.

[ActiveIssue("https://github.com/dotnet/runtime/issues/51371", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
mkhamoyan marked this conversation as resolved.
Show resolved Hide resolved
public void CaseSensitive()
{
if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator")
|| RuntimeInformation.RuntimeIdentifier.StartsWith("tvossimulator"))
{
throw new SkipTestException("iOS/tvOS simulators run on a macOS host and are subject to the same case sensitivity behavior.");
}

DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath());
string testFile = Path.Combine(testDir.FullName, GetTestFileName());
using (File.Create(testFile + "AAAA"))
Expand Down
1 change: 0 additions & 1 deletion src/libraries/System.IO.FileSystem/tests/File/Exists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ public void PathWithReservedDeviceNameAsPath_ReturnsFalse(string component)

[Theory,
MemberData(nameof(UncPathsWithoutShareName))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51371", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void UncPathWithoutShareNameAsPath_ReturnsFalse(string component)
{
Assert.False(Exists(component));
Expand Down