mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fixes #2081. Clipboard unit tests sometimes fail with WSL.
This commit is contained in:
@@ -1500,6 +1500,7 @@ namespace Terminal.Gui {
|
|||||||
}
|
}
|
||||||
}) {
|
}) {
|
||||||
powershell.Start ();
|
powershell.Start ();
|
||||||
|
powershell.WaitForExit ();
|
||||||
if (!powershell.DoubleWaitForExit ()) {
|
if (!powershell.DoubleWaitForExit ()) {
|
||||||
var timeoutError = $@"Process timed out. Command line: bash {powershell.StartInfo.Arguments}.
|
var timeoutError = $@"Process timed out. Command line: bash {powershell.StartInfo.Arguments}.
|
||||||
Output: {powershell.StandardOutput.ReadToEnd ()}
|
Output: {powershell.StandardOutput.ReadToEnd ()}
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ namespace Terminal.Gui {
|
|||||||
try {
|
try {
|
||||||
SetClipboardDataImpl (text);
|
SetClipboardDataImpl (text);
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception) {
|
} catch (Exception ex) {
|
||||||
|
System.Diagnostics.Debug.WriteLine ($"TrySetClipboardData: {ex.Message}");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||||||
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
|
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
|
||||||
.github\workflows\publish.yml = .github\workflows\publish.yml
|
.github\workflows\publish.yml = .github\workflows\publish.yml
|
||||||
README.md = README.md
|
README.md = README.md
|
||||||
|
testenvironments.json = testenvironments.json
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
|||||||
15
testenvironments.json
Normal file
15
testenvironments.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"version": "1",
|
||||||
|
"environments": [
|
||||||
|
{
|
||||||
|
"name": "WSL-Ubuntu",
|
||||||
|
"type": "wsl",
|
||||||
|
"wslDistribution": "Ubuntu"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WSL-Debian",
|
||||||
|
"type": "wsl",
|
||||||
|
"wslDistribution": "Debian"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user