Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/tests/test/commands.rs')
-rw-r--r--helix-term/tests/test/commands.rs123
1 files changed, 4 insertions, 119 deletions
diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs
index 90ff4cf0..9f196827 100644
--- a/helix-term/tests/test/commands.rs
+++ b/helix-term/tests/test/commands.rs
@@ -2,33 +2,10 @@ use helix_term::application::Application;
use super::*;
-mod insert;
mod movement;
-mod reverse_selection_contents;
-mod rotate_selection_contents;
mod write;
#[tokio::test(flavor = "multi_thread")]
-async fn search_selection_detect_word_boundaries_at_eof() -> anyhow::Result<()> {
- // <https://github.com/helix-editor/helix/issues/12609>
- test((
- indoc! {"\
- #[o|]#ne
- two
- three"},
- "gej*h",
- indoc! {"\
- one
- two
- three#[
- |]#"},
- ))
- .await?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
async fn test_selection_duplication() -> anyhow::Result<()> {
// Forward
test((
@@ -656,49 +633,6 @@ async fn test_join_selections_space() -> anyhow::Result<()> {
}
#[tokio::test(flavor = "multi_thread")]
-async fn test_join_selections_comment() -> anyhow::Result<()> {
- test((
- indoc! {"\
- /// #[a|]#bc
- /// def
- "},
- ":lang rust<ret>J",
- indoc! {"\
- /// #[a|]#bc def
- "},
- ))
- .await?;
-
- // Only join if the comment token matches the previous line.
- test((
- indoc! {"\
- #[| // a
- // b
- /// c
- /// d
- e
- /// f
- // g]#
- "},
- ":lang rust<ret>J",
- indoc! {"\
- #[| // a b /// c d e f // g]#
- "},
- ))
- .await?;
-
- test((
- "#[|\t// Join comments
-\t// with indent]#",
- ":lang go<ret>J",
- "#[|\t// Join comments with indent]#",
- ))
- .await?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
async fn test_read_file() -> anyhow::Result<()> {
let mut file = tempfile::NamedTempFile::new()?;
let contents_to_read = "some contents";
@@ -736,7 +670,7 @@ async fn surround_replace_ts() -> anyhow::Result<()> {
const INPUT: &str = r#"\
fn foo() {
if let Some(_) = None {
- testing!("f#[|o]#o)");
+ todo!("f#[|o]#o)");
}
}
"#;
@@ -746,7 +680,7 @@ fn foo() {
r#"\
fn foo() {
if let Some(_) = None {
- testing!('f#[|o]#o)');
+ todo!('f#[|o]#o)');
}
}
"#,
@@ -759,7 +693,7 @@ fn foo() {
r#"\
fn foo() {
if let Some(_) = None [
- testing!("f#[|o]#o)");
+ todo!("f#[|o]#o)");
]
}
"#,
@@ -772,7 +706,7 @@ fn foo() {
r#"\
fn foo() {
if let Some(_) = None {
- testing!{"f#[|o]#o)"};
+ todo!{"f#[|o]#o)"};
}
}
"#,
@@ -795,52 +729,3 @@ fn foo() {
Ok(())
}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn macro_play_within_macro_record() -> anyhow::Result<()> {
- // <https://github.com/helix-editor/helix/issues/12697>
- //
- // * `"aQihello<esc>Q` record a macro to register 'a' which inserts "hello"
- // * `Q"aq<space>world<esc>Q` record a macro to the default macro register which plays the
- // macro in register 'a' and then inserts " world"
- // * `%d` clear the buffer
- // * `q` replay the macro in the default macro register
- // * `i<ret>` add a newline at the end
- //
- // The inner macro in register 'a' should replay within the outer macro exactly once to insert
- // "hello world".
- test((
- indoc! {"\
- #[|]#
- "},
- r#""aQihello<esc>QQ"aqi<space>world<esc>Q%dqi<ret>"#,
- indoc! {"\
- hello world
- #[|]#"},
- ))
- .await?;
-
- Ok(())
-}
-
-#[tokio::test(flavor = "multi_thread")]
-async fn global_search_with_multibyte_chars() -> anyhow::Result<()> {
- // Assert that `helix_term::commands::global_search` handles multibyte characters correctly.
- test((
- indoc! {"\
- // Hello world!
- // #[|
- ]#
- "},
- // start global search
- " /«十分に長い マルチバイトキャラクター列» で検索<ret><esc>",
- indoc! {"\
- // Hello world!
- // #[|
- ]#
- "},
- ))
- .await?;
-
- Ok(())
-}