Skip to content

Commit f606bf4

Browse files
committed
Fix prompt test
Only a part of it (expectedly) fails under screen reader mode.
1 parent 25c7515 commit f606bf4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/RenderTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,14 @@ public void InvokePrompt()
307307
CheckThat(() => AssertScreenIs(1,
308308
Tuple.Create(_console.ForegroundColor, _console.BackgroundColor), "PSREADLINE> ",
309309
TokenClassification.Command, "dir"))));
310+
}
311+
312+
[SkippableFact]
313+
public void InvokeTrickyPrompt()
314+
{
315+
Skip.If(ScreenReaderModeEnabled, "We can't test the colors written in this prompt in screen reader mode.");
316+
317+
TestSetup(KeyMode.Cmd, new KeyHandler("Ctrl+z", PSConsoleReadLine.InvokePrompt));
310318

311319
// Tricky prompt - writes to console directly with colors, uses ^H trick to eliminate trailing space.
312320
using (var ps = PowerShell.Create(RunspaceMode.CurrentRunspace))

0 commit comments

Comments
 (0)