Test fix for Nano: WindowAndCursorProps/Title_Get_Windows_NoNulls (dotnet/corefx...
authorMaryam Ariyan <maryam.ariyan@microsoft.com>
Thu, 24 Jan 2019 13:19:49 +0000 (05:19 -0800)
committerStephen Toub <stoub@microsoft.com>
Thu, 24 Jan 2019 13:19:49 +0000 (08:19 -0500)
* Modifying assertion code for Nano on WindowAndCursorProps/Title_Get_Windows_NoNulls

Fixes: dotnet/corefx#34717

* Change Contains to Equal

Commit migrated from https://github.com/dotnet/corefx/commit/0c437d886f194d34caf20c3078e27c6ce26d4119

src/libraries/System.Console/tests/WindowAndCursorProps.cs

index fab7e15..3fe21a5 100644 (file)
@@ -235,16 +235,7 @@ public class WindowAndCursorProps : RemoteExecutorTestBase
     {
         string title = Console.Title;
         string trimmedTitle = title.TrimEnd('\0');
-
-        if (PlatformDetection.IsWindowsNanoServer)
-        {
-            // Nano server titles are currently broken
-            Assert.NotEqual(trimmedTitle, title);
-        }
-        else
-        {
-            Assert.Equal(trimmedTitle, title);
-        }
+        Assert.Equal(title, trimmedTitle);
     }
 
     [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // Nano currently ignores set title