Add a test
This commit is contained in:
parent
309831ea9a
commit
459f7e3403
1 changed files with 39 additions and 0 deletions
|
@ -1822,6 +1822,45 @@ mod test {
|
||||||
.assert_matches();
|
.assert_matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[gpui::test]
|
||||||
|
async fn test_select_word_object(cx: &mut gpui::TestAppContext) {
|
||||||
|
let mut cx = VimTestContext::new(cx, true).await;
|
||||||
|
let start = indoc! {"
|
||||||
|
The quick brˇowˇnˇ
|
||||||
|
fox «ˇjumps» ov«er
|
||||||
|
the laˇ»zy dogˇ
|
||||||
|
"
|
||||||
|
};
|
||||||
|
|
||||||
|
cx.set_state(start, Mode::HelixNormal);
|
||||||
|
|
||||||
|
cx.simulate_keystrokes("m i w");
|
||||||
|
|
||||||
|
cx.assert_state(
|
||||||
|
indoc! {"
|
||||||
|
The quick «brownˇ»
|
||||||
|
fox «jumpsˇ» over
|
||||||
|
the «lazyˇ» dogˇ
|
||||||
|
"
|
||||||
|
},
|
||||||
|
Mode::HelixNormal,
|
||||||
|
);
|
||||||
|
|
||||||
|
cx.set_state(start, Mode::HelixNormal);
|
||||||
|
|
||||||
|
cx.simulate_keystrokes("m a w");
|
||||||
|
|
||||||
|
cx.assert_state(
|
||||||
|
indoc! {"
|
||||||
|
The quick« brownˇ»
|
||||||
|
fox «jumps ˇ»over
|
||||||
|
the «lazy ˇ»dogˇ
|
||||||
|
"
|
||||||
|
},
|
||||||
|
Mode::HelixNormal,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[gpui::test]
|
#[gpui::test]
|
||||||
async fn test_visual_word_object(cx: &mut gpui::TestAppContext) {
|
async fn test_visual_word_object(cx: &mut gpui::TestAppContext) {
|
||||||
let mut cx = NeovimBackedTestContext::new(cx).await;
|
let mut cx = NeovimBackedTestContext::new(cx).await;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue