Explorar o código

fixed WindowsDriver to work in linux unit tests

Tigger Kindel %!s(int64=2) %!d(string=hai) anos
pai
achega
71d51756f9
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

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

@@ -798,8 +798,10 @@ internal class WindowsDriver : ConsoleDriver {
 		if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
 			WinConsole = new WindowsConsole ();
 			// otherwise we're probably running in unite tests
+			Clipboard = new WindowsClipboard ();
+		} else {
+			Clipboard = new FakeDriver.FakeClipboard ();
 		}
-		Clipboard = new WindowsClipboard ();
 
 		_isWindowsTerminal = Environment.GetEnvironmentVariable ("WT_SESSION") != null;