Browse Source

Fix unit test.

BDisp 9 months ago
parent
commit
5b39c3d5a6
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

+ 5 - 1
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

@@ -2345,7 +2345,11 @@ internal class WindowsMainLoop : IMainLoopDriver
     {
     {
         _consoleDriver = consoleDriver ?? throw new ArgumentNullException (nameof (consoleDriver));
         _consoleDriver = consoleDriver ?? throw new ArgumentNullException (nameof (consoleDriver));
         _winConsole = ((WindowsDriver)consoleDriver).WinConsole;
         _winConsole = ((WindowsDriver)consoleDriver).WinConsole;
-        _winConsole._mainLoop = this;
+
+        if (!ConsoleDriver.RunningUnitTests)
+        {
+            _winConsole._mainLoop = this;
+        }
     }
     }
 
 
     public EscSeqRequests EscSeqRequests { get; } = new ();
     public EscSeqRequests EscSeqRequests { get; } = new ();