Add Disposal Test and fix an issue where the CopyClipboard test was failing (#2936)

* add Disposal Test and fix an ssue where the CopyClipboard test was failing

* Update ViewDisposalTest.cs

* Update ViewDisposalTest.cs: Some Formatting, and adding code comments.

---------

Co-authored-by: John Züchler <john.zuechler@eks-intec.de>
This commit is contained in:
usr
2023-10-30 21:33:34 +01:00
committed by GitHub
parent 6f53aa480e
commit 34c6b6ebcc
2 changed files with 102 additions and 1 deletions

View File

@@ -159,7 +159,7 @@ namespace Terminal.Gui.DriverTests {
output.WriteLine ($"Pasting to OS clipboard: {clipText}...");
if (RuntimeInformation.IsOSPlatform (OSPlatform.Windows)) {
(exitCode, result) = ClipboardProcessRunner.Process ("pwsh", $"-command \"Set-Clipboard -Value \\\"{clipText}\\\"\"");
(exitCode, result) = ClipboardProcessRunner.Process ("pwsh", $"-command \"Set-Clipboard -Value '{clipText}'\"");
output.WriteLine ($" Windows: pwsh Set-Clipboard: exitCode = {exitCode}, result = {result}");
getClipText = Clipboard.Contents.ToString ();