Flesh out v1.0 of vim :

This commit is contained in:
Conrad Irwin 2023-09-20 15:24:31 -06:00
parent 6ad1f19a21
commit 2d9db0fed1
16 changed files with 516 additions and 82 deletions

View file

@ -1,7 +1,5 @@
use std::ops::{Deref, DerefMut};
use gpui::ContextHandle;
use crate::state::Mode;
use super::{ExemptionFeatures, NeovimBackedTestContext, SUPPORTED_FEATURES};
@ -33,26 +31,17 @@ impl<'a, const COUNT: usize> NeovimBackedBindingTestContext<'a, COUNT> {
self.consume().binding(keystrokes)
}
pub async fn assert(
&mut self,
marked_positions: &str,
) -> Option<(ContextHandle, ContextHandle)> {
pub async fn assert(&mut self, marked_positions: &str) {
self.cx
.assert_binding_matches(self.keystrokes_under_test, marked_positions)
.await
.await;
}
pub async fn assert_exempted(
&mut self,
marked_positions: &str,
feature: ExemptionFeatures,
) -> Option<(ContextHandle, ContextHandle)> {
pub async fn assert_exempted(&mut self, marked_positions: &str, feature: ExemptionFeatures) {
if SUPPORTED_FEATURES.contains(&feature) {
self.cx
.assert_binding_matches(self.keystrokes_under_test, marked_positions)
.await
} else {
None
}
}