Skip to content

Commit b6fff43

Browse files
authored
Prevents unnecessary noise log errors on unit tests (#4294)
* Prevents unnecessary noise log errors on unit tests * Prevent any code in the Peek method
1 parent 549436e commit b6fff43

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Terminal.Gui/Drivers/WindowsDriver/WindowsInput.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ public WindowsInput ()
6161

6262
protected override bool Peek ()
6363
{
64+
if (ConsoleDriver.RunningUnitTests)
65+
{
66+
return false;
67+
}
68+
6469
const int bufferSize = 1; // We only need to check if there's at least one event
6570
nint pRecord = Marshal.AllocHGlobal (Marshal.SizeOf<InputRecord> () * bufferSize);
6671

0 commit comments

Comments
 (0)