pub struct StepTest { /* private fields */ }Expand description
Implementations§
Source§impl StepTest
impl StepTest
Sourcepub async fn new() -> Self
pub async fn new() -> Self
Create new step test with automatic log capture (spawns server).
Server logs are captured to tmp/test-logs/{test_name}_{timestamp}.log.
This is invaluable for debugging step-by-step test failures.
§Panics
Panics if server fails to spawn.
Sourcepub async fn with_modules(modules: &[&str]) -> Self
pub async fn with_modules(modules: &[&str]) -> Self
Create new step test with extra modules loaded.
See super::IntegrationTest::with_modules for details.
§Panics
Panics if server fails to spawn.
Sourcepub async fn with_env(env_vars: &[(&str, &str)]) -> Self
pub async fn with_env(env_vars: &[(&str, &str)]) -> Self
Create new step test with custom environment variables.
See super::IntegrationTest::with_env for details.
§Panics
Panics if server fails to spawn.
Sourcepub fn log_path(&self) -> Option<&Path>
pub fn log_path(&self) -> Option<&Path>
Get the path to the server log file for debugging.
Returns None if log capture is not enabled.
Sourcepub fn with_buffer(self, content: &str) -> Self
pub fn with_buffer(self, content: &str) -> Self
Set initial buffer content.
Sourcepub fn with_cursor_at(self, line: u16, col: u16) -> Self
pub fn with_cursor_at(self, line: u16, col: u16) -> Self
Set initial cursor position (line, col) - 0-indexed.
Sourcepub fn with_delay(self, ms: u64) -> Self
pub fn with_delay(self, ms: u64) -> Self
Set default delay between steps (ms).
Sourcepub fn expect_cursor(self, line: u16, col: u16) -> Self
pub fn expect_cursor(self, line: u16, col: u16) -> Self
Add cursor expectation to last step.
Sourcepub fn expect_buffer(self, expected: &str) -> Self
pub fn expect_buffer(self, expected: &str) -> Self
Add buffer content expectation to last step.
Sourcepub fn expect_buffer_contains(self, substring: &str) -> Self
pub fn expect_buffer_contains(self, substring: &str) -> Self
Add buffer contains expectation to last step.
Sourcepub fn expect_mode_contains(self, substring: &str) -> Self
pub fn expect_mode_contains(self, substring: &str) -> Self
Add mode contains expectation to last step.
Sourcepub fn expect_edit_mode(self, mode: &str) -> Self
pub fn expect_edit_mode(self, mode: &str) -> Self
Add exact edit mode expectation to last step.
Sourcepub fn expect_register(self, reg: &str, content: &str, yank_type: &str) -> Self
pub fn expect_register(self, reg: &str, content: &str, yank_type: &str) -> Self
Add register expectation to last step.
Auto Trait Implementations§
impl Freeze for StepTest
impl !RefUnwindSafe for StepTest
impl Send for StepTest
impl Sync for StepTest
impl Unpin for StepTest
impl UnsafeUnpin for StepTest
impl !UnwindSafe for StepTest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request