Commit Graph

21 Commits (2c37e25cb552f1b64ad6815bb03c40d6d5aacb24)

Author SHA1 Message Date
A-Walrus 2ac1de305e
Fix backwards selection duplication widening bug (#2945)
* Fix backwards selection duplication widening bug

* Add integration tests

* Make tests line-ending agnostic

Make tests line-ending agnostic

Use indoc to fix tests

Fix line-ending on test input
2 years ago
Skyler Hawthorne 5f7c247430 replace phrase in tests 3 years ago
Skyler Hawthorne 665286c199 factor new Application with file arg to function 3 years ago
Skyler Hawthorne 41bf1d5811 fix(command): write-quit: do not quit if write fails
During write-quit, if the file fails to be written for any reason, helix
will still quit without saving the changes. This fixes this behavior by
introducing fallibility to the asynchronous job queues. This will also
benefit all contexts which may depend on these job queues.

Fixes #1575
3 years ago
Skyler Hawthorne fac36bc5ea add test for write-quit happy path 3 years ago
Skyler Hawthorne 7c0bca186c rename test helpers 3 years ago
Skyler Hawthorne 374724f5ac ignore failing write path tests until fixes are merged 3 years ago
Skyler Hawthorne 8d8d389536 rename top level module to satisfy cargo fmt 3 years ago
Skyler Hawthorne acf931709a use a read only file to ensure write failure 3 years ago
Skyler Hawthorne ef8fe5a5ce use system's appropriate line ending 3 years ago
Skyler Hawthorne 1533f48934 use Results in integration tests for more error context 3 years ago
Skyler Hawthorne 2386c81ebc use idle timer instead of fixed timeout 3 years ago
Skyler Hawthorne 40120967e9 tests for buffer-close 3 years ago
Skyler Hawthorne 07fc80aece tests for serialized writes 3 years ago
Skyler Hawthorne ee705dcb33 use main application event loop
Use the Application's main event loop to allow LSP, file writes, etc
3 years ago
Skyler Hawthorne 36e5809f63 add test for ensuring the initial cursor on a newly opened file 3 years ago
Skyler Hawthorne 267605d147 reorganize tests into groups 3 years ago
Skyler Hawthorne 84bbe6b8f3 refactor helpers, use new test helpers 3 years ago
Skyler Hawthorne 0f3c10a021 Fix initial selection of Document in new view
When a new View of a Document is created, a default cursor of 0, 0 is
created, and it does not get normalized to a single width cursor until
at least one movement of the cursor happens. This appears to have no
practical negative effect that I could find, but it makes tests difficult
to work with, since the initial selection is not what you expect it to be.

This changes the initial selection of a new View to be the width of the
first grapheme in the text.
3 years ago
Skyler Hawthorne 502d3290fb improve test harness
* Use new macro syntax for encoding sequences of keys
* Make convenience helpers for common test pattern
* Use indoc for inline indented raw strings
* Add feature flag for integration testing to disable rendering
3 years ago
Blaž Hrastnik 308cab3e5c Integration testing harness 3 years ago