-
-
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 test helper improvements #6156
Merged
the-mikedavis
merged 7 commits into
helix-editor:master
from
dead10ck:integration-test-improve
Mar 20, 2023
Merged
Integration test helper improvements #6156
the-mikedavis
merged 7 commits into
helix-editor:master
from
dead10ck:integration-test-improve
Mar 20, 2023
Conversation
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
Merged
dead10ck
force-pushed
the
integration-test-improve
branch
from
March 2, 2023 05:09
ec3ff23
to
9c77e34
Compare
pascalkuthe
added
the
S-waiting-on-review
Status: Awaiting review from a maintainer.
label
Mar 2, 2023
dead10ck
force-pushed
the
integration-test-improve
branch
from
March 6, 2023 00:19
9c77e34
to
53adf91
Compare
dead10ck
force-pushed
the
integration-test-improve
branch
3 times, most recently
from
March 11, 2023 04:51
3feb2a2
to
f19fb10
Compare
archseer
previously approved these changes
Mar 16, 2023
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.
LGTM, just a Cargo.lock conflict to resolve
dead10ck
force-pushed
the
integration-test-improve
branch
from
March 16, 2023 13:45
f19fb10
to
779234e
Compare
Done 🙂 |
The current test DSL currently has no way to express being at the end of a line, save for putting an explicit LF or CRLF inside the `#[|]#`. The problem with this approach is that it can add unintended extra new lines if used in conjunction with raw strings, which insert newlines for you. This is a simple attempt to mitigate this problem. If there is an explicit newline character at the end of the selection, and then it is immediately followed by the same newline character at the right end of the selection, this following newline is removed. This way, one can express a cursor at the end of a line explicitly.
test::plain uses char indices when it should use byte indices
dead10ck
force-pushed
the
integration-test-improve
branch
from
March 19, 2023 20:27
779234e
to
01c5382
Compare
the-mikedavis
approved these changes
Mar 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
reorganize write command tests to their own module
make
TestCase::From
more generic for ergonomicsprint doc state during tests for much better debugging
To help with ergonomics,
test::print
was changed to allow explicit newlines in test DSL. The current test DSL currently has no way to express being at the end of a line, save for putting an explicit LF or CRLF inside the#[|]#
. The problem with this approach is that it can add unintended extra new lines if used in conjunction with raw strings, which insert newlines for you.This is a simple attempt to mitigate this problem. If there is an explicit newline character at the end of the selection, and then it is immediately followed by the same newline character at the right end of the selection, this following newline is removed. This way, one can express a cursor at the end of a line explicitly.
fix a bug
test::plain
: it is currently using char indices forString::insert_str
which is supposed to take byte indices. This causes panics on Unicode charactersuse
AppBuilder
more consistently throughout tests to make use of saner defaults and improve readability