Add timeout testcase

This commit is contained in:
俺不叫化咕龙 2026-05-29 21:01:02 +08:00
parent a71c3c867e
commit b7b8c03c51

View file

@ -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) {