-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Integration testing harness #2359
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
0623a72
move config parsing back into main
dead10ck adb6cd5
Simplify handle_terminal_events signature
archseer 308cab3
Integration testing harness
archseer 502d329
improve test harness
dead10ck 0f3c10a
Fix initial selection of Document in new view
dead10ck 84bbe6b
refactor helpers, use new test helpers
dead10ck 267605d
reorganize tests into groups
dead10ck 36e5809
add test for ensuring the initial cursor on a newly opened file
dead10ck ee705dc
use main application event loop
dead10ck 07fc80a
tests for serialized writes
dead10ck 4012096
tests for buffer-close
dead10ck 2386c81
use idle timer instead of fixed timeout
dead10ck 2fbf833
add integration feature to github tests
dead10ck 1533f48
use Results in integration tests for more error context
dead10ck ed950fc
Add more context; Editor::open doesn't need to own path
dead10ck 652cdda
use test terminal backend for integration tests
dead10ck cb0440b
use env var for integration test log level
dead10ck 4e34ee7
don't read from stdin for integration tests
dead10ck 28e94fb
need the full languages config for integration tests
dead10ck ef8fe5a
use system's appropriate line ending
dead10ck acf9317
use a read only file to ensure write failure
dead10ck 8d8d389
rename top level module to satisfy cargo fmt
dead10ck 374724f
ignore failing write path tests until fixes are merged
dead10ck 526c9be
consolidate idle timer logic, make conditional
dead10ck 7c0bca1
rename test helpers
dead10ck fac36bc
add test for write-quit happy path
dead10ck 41bf1d5
fix(command): write-quit: do not quit if write fails
dead10ck 086b63a
add integration-test cargo alias
dead10ck 65bf683
update docs for integration tests
dead10ck 665286c
factor new Application with file arg to function
dead10ck 5f7c247
replace phrase in tests
dead10ck 458b89e
Merge branch 'master' into test-harness
archseer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[alias] | ||
xtask = "run --package xtask --" | ||
integration-test = "test --features integration --workspace --test integration" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
target | ||
.direnv | ||
helix-term/rustfmt.toml | ||
helix-syntax/languages/ | ||
result | ||
runtime/grammars |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we? I'd list any languages we test with but avoid fetching uncommon grammars that won't ever be used in tests, that way we're not waiting for 50+ grammars to build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can do that. It just means that a contributor will have to remember to add a language if they want to add tests for it. And it will be a bit confusing because their tests will pass locally for them, but fail on GitHub, and for not obvious reasons. It was failing for me on the C indentation test, but the failure was the wrong number of spaces. It took a while to figure out it was because of the grammar missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point, maybe we should include
languages.toml
in the test directory, then conditionally compile using that languages.toml over the one in the root dir if running tests?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I just tried implementing this, but I just realized, the feature flag would help if we were only running one test command, but if we separate regular unit tests from integration tests into separate phases, then I'm not sure how to detect if we're running unit tests without the integration feature flag.