aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test/movement.rs
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-06-11 03:35:34 +0000
committerSkyler Hawthorne2022-06-19 04:00:31 +0000
commit665286c199b344c0bd65772156b5e460ff11d768 (patch)
treeea11016ae97144d4424bfbd4ec4d971d152493ea /helix-term/tests/test/movement.rs
parent65bf6836b71e309a43d39b75a3fac7446604592b (diff)
factor new Application with file arg to function
Diffstat (limited to 'helix-term/tests/test/movement.rs')
-rw-r--r--helix-term/tests/test/movement.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/helix-term/tests/test/movement.rs b/helix-term/tests/test/movement.rs
index 5fb2ce25..088685df 100644
--- a/helix-term/tests/test/movement.rs
+++ b/helix-term/tests/test/movement.rs
@@ -1,5 +1,3 @@
-use helix_term::application::Application;
-
use super::*;
#[tokio::test]
@@ -72,14 +70,7 @@ async fn insert_to_normal_mode_cursor_position() -> anyhow::Result<()> {
async fn cursor_position_newly_opened_file() -> anyhow::Result<()> {
let test = |content: &str, expected_sel: Selection| -> anyhow::Result<()> {
let file = helpers::temp_file_with_contents(content)?;
-
- let mut app = Application::new(
- Args {
- files: vec![(file.path().to_path_buf(), Position::default())],
- ..Default::default()
- },
- Config::default(),
- )?;
+ let mut app = helpers::app_with_file(file.path())?;
let (view, doc) = helix_view::current!(app.editor);
let sel = doc.selection(view.id).clone();