diff options
author | Skyler Hawthorne | 2022-10-22 21:29:09 +0000 |
---|---|---|
committer | Michael Davis | 2023-03-20 23:34:40 +0000 |
commit | d3b051d28ea62c313fc72583d04f2a897e8d6f40 (patch) | |
tree | 3a3ff15f7ba98190720850a4059298f3f0676e24 /helix-term/tests/test | |
parent | 58ea1930544df165a4a1342932e4dd8cb93e14ea (diff) |
fix test::plain
test::plain uses char indices when it should use byte indices
Diffstat (limited to 'helix-term/tests/test')
-rw-r--r-- | helix-term/tests/test/helpers.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/tests/test/helpers.rs b/helix-term/tests/test/helpers.rs index de81f758..77332fa5 100644 --- a/helix-term/tests/test/helpers.rs +++ b/helix-term/tests/test/helpers.rs @@ -65,7 +65,7 @@ pub async fn test_key_sequences( for (i, (in_keys, test_fn)) in inputs.into_iter().enumerate() { let (view, doc) = current_ref!(app.editor); - let state = test::plain(&doc.text().to_string(), doc.selection(view.id)); + let state = test::plain(doc.text().slice(..), doc.selection(view.id)); log::debug!("executing test with document state:\n\n-----\n\n{}", state); @@ -81,7 +81,7 @@ pub async fn test_key_sequences( if !app_exited { let (view, doc) = current_ref!(app.editor); - let state = test::plain(&doc.text().to_string(), doc.selection(view.id)); + let state = test::plain(doc.text().slice(..), doc.selection(view.id)); log::debug!( "finished running test with document state:\n\n-----\n\n{}", |