summaryrefslogtreecommitdiff
path: root/helix-term/tests/test/helpers.rs
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-10-22 21:29:09 +0000
committerMichael Davis2023-03-20 23:34:40 +0000
commitd3b051d28ea62c313fc72583d04f2a897e8d6f40 (patch)
tree3a3ff15f7ba98190720850a4059298f3f0676e24 /helix-term/tests/test/helpers.rs
parent58ea1930544df165a4a1342932e4dd8cb93e14ea (diff)
fix test::plain
test::plain uses char indices when it should use byte indices
Diffstat (limited to 'helix-term/tests/test/helpers.rs')
-rw-r--r--helix-term/tests/test/helpers.rs4
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{}",