Add test for word characters in vim
This commit is contained in:
parent
14fa996cdc
commit
168a213a44
3 changed files with 42 additions and 1 deletions
|
@ -261,3 +261,29 @@ async fn test_status_indicator(
|
|||
assert!(mode_indicator.read(cx).mode.is_some());
|
||||
});
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
async fn test_word_characters(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = VimTestContext::new_typescript(cx).await;
|
||||
cx.set_state(
|
||||
indoc! { "
|
||||
class A {
|
||||
#ˇgoop = 99;
|
||||
$ˇgoop () { return this.#gˇoop };
|
||||
};
|
||||
console.log(new A().$gooˇp())
|
||||
"},
|
||||
Mode::Normal,
|
||||
);
|
||||
cx.simulate_keystrokes(["v", "i", "w"]);
|
||||
cx.assert_state(
|
||||
indoc! {"
|
||||
class A {
|
||||
«#goopˇ» = 99;
|
||||
«$goopˇ» () { return this.«#goopˇ» };
|
||||
};
|
||||
console.log(new A().«$goopˇ»())
|
||||
"},
|
||||
Mode::Visual,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue