mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Including also the variables inside the lock.
This commit is contained in:
@@ -79,11 +79,12 @@ namespace Terminal.Gui.Core {
|
||||
[AutoInitShutdown]
|
||||
public void Contents_Gets_From_OS_Clipboard ()
|
||||
{
|
||||
var clipText = "This is a clipboard unit test to get clipboard from OS.";
|
||||
var exit = false;
|
||||
var getClipText = "";
|
||||
|
||||
lock (Clipboard.Contents) {
|
||||
|
||||
var clipText = "This is a clipboard unit test to get clipboard from OS.";
|
||||
var exit = false;
|
||||
var getClipText = "";
|
||||
|
||||
Application.Iteration += () => {
|
||||
if (RuntimeInformation.IsOSPlatform (OSPlatform.Windows)) {
|
||||
// using (Process clipExe = new Process {
|
||||
@@ -188,12 +189,12 @@ namespace Terminal.Gui.Core {
|
||||
|
||||
Application.RequestStop ();
|
||||
};
|
||||
}
|
||||
|
||||
Application.Run ();
|
||||
Application.Run ();
|
||||
|
||||
if (!exit) {
|
||||
Assert.Equal (clipText, getClipText);
|
||||
if (!exit) {
|
||||
Assert.Equal (clipText, getClipText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user