Browse Source

fixed WindowsDriver to work in linux unit tests

Tigger Kindel 2 years ago
parent
commit
71d51756f9
1 changed files with 3 additions and 1 deletions
  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;