aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test
Commit message (Collapse)AuthorAge
* Trim quotes and braces from paths in goto_file_impl (#4370)Dario Oddenino2022-10-28
| | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* flush writes on force quit (#4397)Skyler Hawthorne2022-10-21
| | | | | | When force quitting, we need to block on the pending writes to ensure that write commands succeed before exiting, and also to avoid a crash when all the views are gone before the auto format call returns from the LS.
* 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
* Silence dead_code warning on AppBuilder::with_configMichael Davis2022-10-20
| | | | | This function is not currently used but is likely to be useful in the future, so this change silences the dead_code warning.
* Remove language-server configuration in integration testsMichael Davis2022-10-20
| | | | | | | | | | | | | | | | | | | | | This change removes language server configuration from the default languages.toml config for integration tests. No integration-tests currently depend on the availability of a language server but if any future test needs to, it may provide a language server configuration by passing an override into the `test_syntax_conf` helper. Language-servers in integration tests cause false-positive failures when running integration tests in GitHub Actions CI. The Windows runner appears to have `clangd` installed and all OS runners have the `R` binary installed but not the `R` language server package. If a test file created by `tempfile::NamedTempFile` happens to have a file extension of `r`, the test will most likely fail because the R language server will fail to start and will become a broken pipe, meaning that it will fail to shutdown within the timeout, causing a false-positive failure. This happens surprisingly often in practice. Language servers (especially rust-analyzer) also emit unnecessary log output when initializing, which this change silences.
* Use helix_view::apply_transaction in integration-testsMichael Davis2022-10-20
| | | | | | | `helix_view::apply_transaction` closes over `Document::apply` and `View::apply` to ensure that jumplist entries are updated when a document changes from a transaction. `Document::apply` shouldn't be called directly - this helper function should be used instead.
* improve app close failure displaySkyler Hawthorne2022-10-19
|
* fix testsSkyler Hawthorne2022-10-19
|
* document should save even if formatter failsSkyler Hawthorne2022-10-19
|
* fix write scratch buffer to fileSkyler Hawthorne2022-10-19
|
* various fixes in write-all pathSkyler Hawthorne2022-10-19
|
* update write-quit to wait for savesSkyler Hawthorne2022-10-19
|
* fix buffer-closeSkyler Hawthorne2022-10-19
|
* fix(write): do not set new path on document until write succeedsSkyler Hawthorne2022-10-19
| | | | | | If a document is written with a new path, currently, in the event that the write fails, the document still gets its path changed. This fixes it so that the path is not updated unless the write succeeds.
* fix: buffer-close ensuring writesSkyler Hawthorne2022-10-19
| | | | Make sure buffer-close waits for the document to finish its writes.
* chore(write): serialize write operations within a DocumentSkyler Hawthorne2022-10-19
| | | | | | | | | | | | | | | The way that document writes are handled are by submitting them to the async job pool, which are all executed opportunistically out of order. It was discovered that this can lead to write inconsistencies when there are multiple writes to the same file in quick succession. This seeks to fix this problem by removing document writes from the general pool of jobs and into its own specialized event. Now when a user submits a write with one of the write commands, a request is simply queued up in a new mpsc channel that each Document makes to handle its own writes. This way, if multiple writes are submitted on the same document, they are executed in order, while still allowing concurrent writes for different documents.
* Fix append cursor location when selection anchor is at end of document (#4147)Graic2022-10-12
|
* Add tests for select-mode TS textobjectsMichael Davis2022-10-03
|
* fix: Recalculate completion when going through prompt history (#3193)Frojdholm2022-08-31
| | | | | | | | | | | | | | | | | | | | | | | | * fix: Recalculate completion when going through prompt history * Update completion when the prompt line is changed It should not be possible to update the line without also updating the completion since the completion holds an index into the line. * Fix Prompt::with_line recalculate completion with_line was the last function where recalculate completion had to be done manually. This function now also recalculates the completion so that it's impossible to forget. * Exit selection when recalculating completion Keeping the selection index when the completion has been recalculated doesn't make sense. This clears the selection automatically, removing most needs to manually clear it. * Remove &mut on save_filter Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Fix backwards selection duplication widening bug (#2945)A-Walrus2022-07-04
| | | | | | | | | | | | | * 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
* replace phrase in testsSkyler Hawthorne2022-06-19
|
* factor new Application with file arg to functionSkyler Hawthorne2022-06-19
|
* fix(command): write-quit: do not quit if write failsSkyler Hawthorne2022-06-19
| | | | | | | | | 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
* add test for write-quit happy pathSkyler Hawthorne2022-06-19
|
* rename test helpersSkyler Hawthorne2022-06-19
|
* ignore failing write path tests until fixes are mergedSkyler Hawthorne2022-06-19
|
* rename top level module to satisfy cargo fmtSkyler Hawthorne2022-06-19