mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
Add timeout testcase
This commit is contained in:
parent
a71c3c867e
commit
b7b8c03c51
1 changed files with 23 additions and 0 deletions
|
|
@ -1447,6 +1447,29 @@ async fn test_pending_input_mapping_output_undo(cx: &mut gpui::TestAppContext) {
|
|||
cx.assert_state("ˇone", Mode::Normal);
|
||||
}
|
||||
|
||||
#[perf]
|
||||
#[gpui::test]
|
||||
async fn test_pending_input_mapping_output_undo_delay(cx: &mut gpui::TestAppContext) {
|
||||
let mut cx = VimTestContext::new(cx, true).await;
|
||||
|
||||
cx.update(|_, cx| {
|
||||
cx.bind_keys([KeyBinding::new(
|
||||
"a b c",
|
||||
HandleInput("d".to_string()),
|
||||
Some("vim_mode == insert"),
|
||||
)])
|
||||
});
|
||||
|
||||
cx.set_state("ˇone", Mode::Normal);
|
||||
cx.simulate_keystrokes("i a b");
|
||||
cx.executor().advance_clock(Duration::from_millis(1500));
|
||||
cx.run_until_parked();
|
||||
cx.assert_state("abˇone", Mode::Insert);
|
||||
|
||||
cx.simulate_keystrokes("escape u");
|
||||
cx.assert_state("ˇone", Mode::Normal);
|
||||
}
|
||||
|
||||
#[perf]
|
||||
#[gpui::test]
|
||||
async fn test_lsp_completions_undo(cx: &mut gpui::TestAppContext) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue