Skip to content

Commit

Permalink
Disable on Server Core a couple tests that use notepad (#44972)
Browse files Browse the repository at this point in the history
  • Loading branch information
danmoseley authored Nov 20, 2020
1 parent f22d7c5 commit 38c9b98
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ public void StartInfo_NotepadWithContent(bool useShellExecute)
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer), // Nano does not support UseShellExecute
nameof(PlatformDetection.IsNotWindowsServerCore), // https://github.com/dotnet/runtime/issues/26231
nameof(PlatformDetection.IsNotWindows8x))] // https://github.com/dotnet/runtime/issues/22007
[OuterLoop("Launches notepad")]
[PlatformSpecific(TestPlatforms.Windows)]
Expand Down Expand Up @@ -1168,6 +1169,11 @@ public void StartInfo_NotepadWithContent_withArgumentList(bool useShellExecute)

private void VerifyNotepadMainWindowTitle(Process process, string filename)
{
if (PlatformDetection.IsWindowsServerCore)
{
return; // On Server Core, notepad exists but does not return a title
}

// On some Windows versions, the file extension is not included in the title
string expected = Path.GetFileNameWithoutExtension(filename);

Expand Down

0 comments on commit 38c9b98

Please sign in to comment.