Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce fragility of clipboard related unit tests #2205

Closed
tig opened this issue Nov 8, 2022 · 0 comments · Fixed by #2206
Closed

Reduce fragility of clipboard related unit tests #2205

tig opened this issue Nov 8, 2022 · 0 comments · Fixed by #2206
Labels
build-and-deploy Issues regarding to building and deploying Terminal.Gui enhancement testing Issues related to testing

Comments

@tig
Copy link
Collaborator

tig commented Nov 8, 2022

I am sure the fact that the unit tests regularly fail because the clipboard changes while they are running annoys you.

It annoys me.

I have a proposal, that I think will address this, and generally make the unit tests less fragile.

  1. Ensure the only Unit Tests that actually talk to the real/underlying OS clipboard are those in ClipboardTests.cs. They should verify that Terminal.Gui's interaction with the OS clipboard on various platforms actually works.
  2. Ensure that ALL other tests that verify the clipboard works (e.g. TextView's extensive cut/paste tests) use a FAKE Clipboard implementation.

Thoughts?

@tig tig added enhancement build-and-deploy Issues regarding to building and deploying Terminal.Gui testing Issues related to testing labels Nov 8, 2022
@tig tig closed this as completed in #2206 Jan 2, 2023
tig added a commit that referenced this issue Jan 2, 2023
Fixes #2205. Reduce fragility of clipboard related unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-and-deploy Issues regarding to building and deploying Terminal.Gui enhancement testing Issues related to testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant