aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/test.rs
Commit message (Collapse)AuthorAge
* fix test::plainSkyler Hawthorne2023-03-20
| | | | test::plain uses char indices when it should use byte indices
* Allow explicit newlines in test DSLSkyler Hawthorne2023-03-20
| | | | | | | | | | | | | 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.
* Run clippy on workspace in CI (#4614)Jonathan LEI2022-11-07
|
* Fix multi byte auto pairs (#4024)Skyler Hawthorne2022-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix test::print for Unicode The print function was not generating correct translations when the input has Unicode (non-ASCII) in it. This is due to its use of String::len, which gives the length in bytes, not chars. * Fix multi-code point auto pairs The current code for auto pairs is counting offsets by summing the length of the open and closing chars with char::len_utf8. Unfortunately, this gives back bytes, and the offset needs to be in chars. Additionally, it was discovered that there was a preexisting bug where the selection was not computed correctly in the case that the cursor was: 1. a single grapheme in width 2. this grapheme was more than one char 3. the direction of the cursor is backwards 4. a secondary range In this case, the offset was not being added into the anchor. This was fixed. * migrate auto pairs tests to integration * review comments
* Remove usage of format ident feature from tests (#2028)Michael Davis2022-04-08
|
* Add missing # back to test outputIvan Tham2022-04-02
|
* Refactor test print to be more readableGokul Soumya2022-04-02
|
* Change test mark from ^@ to #[|]#Ivan Tham2022-04-02
|
* Add paragraph textobjectIvan Tham2022-04-02
| | | | | Change parameter/argument key from p to a since paragraph only have p but parameter are also called arguments sometimes and a is not used.
* Add (prev) paragraph motionIvan Tham2022-04-02
Also improved testing facility. Fix #1580