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.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs index 29f76cfb..20e8ac9a 100644 --- a/helix-term/tests/test/commands.rs +++ b/helix-term/tests/test/commands.rs @@ -820,3 +820,25 @@ async fn macro_play_within_macro_record() -> anyhow::Result<()> { 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(()) +} |