Skip to content

Commit

Permalink
Fixed netfx System.Runtime.Extensions.Tests fails on non-English Wind…
Browse files Browse the repository at this point in the history
…ows (dotnet/corefx#28361)

Commit migrated from dotnet/corefx@619dbe6
  • Loading branch information
AlexRadch authored and stephentoub committed Mar 22, 2018
1 parent bff0e5f commit ff4ef2c
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,21 @@ public void IsFinalizingForUnload()
[Fact]
public void toString()
{
string actual = AppDomain.CurrentDomain.ToString();
// Workaround issue: UWP culture is process wide
RemoteInvoke(() =>
{
CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;

// NetFx has additional line endings
if (PlatformDetection.IsFullFramework)
actual = actual.Trim();
string actual = AppDomain.CurrentDomain.ToString();

string expected = "Name:" + AppDomain.CurrentDomain.FriendlyName + Environment.NewLine + "There are no context policies.";
Assert.Equal(expected, actual);
// NetFx has additional line endings
if (PlatformDetection.IsFullFramework)
actual = actual.Trim();

string expected = "Name:" + AppDomain.CurrentDomain.FriendlyName + Environment.NewLine + "There are no context policies.";
Assert.Equal(expected, actual);

}).Dispose();
}

[Fact]
Expand Down

0 comments on commit ff4ef2c

Please sign in to comment.