Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a few tests for MacVim using XCTest. Previously MacVim had essentially zero automatic tests. While we run the Vim tests in CI, those mostly exercise Vim features, not MacVim. These new tests are Objective C tests that are designed for MacVim-layer functionality instead. Only adding a few tests (both unit tests and integration tests) now to get started and set up a template for different types of tests but more will be added later.
Since MacVim consists of a lot of macOS API calls, a lot of those functionality are not easy to test automatically as they rely on behaviors out of MacVim's control (e.g. full screen functionality). The goal here is not to get 100% test coverage, but to catch areas prone to have regressions, code with non-straightforward logic, functionality that are annoying to manually test (e.g. key input), code blocks that perform calculations and can be easily unit tested. Areas that would be harder to add tests for include integration with macOS, e.g. full screen or dual monitor, interacting with the windowing system, or things that require screenshots in order to properly validate.
The goal here is to progressively add more tests as we touch different parts of MacVim to help catch regressions. Old code that works and isn't being touched will be lower priority as it's unlikely they will suddenly break.