From 502d3290fb88d8a871b0824adc7987a98104933d Mon Sep 17 00:00:00 2001 From: Skyler Hawthorne Date: Mon, 17 Jan 2022 19:04:40 -0500 Subject: improve test harness * Use new macro syntax for encoding sequences of keys * Make convenience helpers for common test pattern * Use indoc for inline indented raw strings * Add feature flag for integration testing to disable rendering --- helix-term/src/application.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'helix-term/src') diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 09b7836f..21595eae 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -187,13 +187,21 @@ impl Application { } fn render(&mut self) { - let mut cx = crate::compositor::Context { - editor: &mut self.editor, - jobs: &mut self.jobs, - scroll: None, - }; + #[cfg(feature = "integration")] + return; + + #[allow(unreachable_code)] + { + let compositor = &mut self.compositor; - // self.compositor.render(&mut cx); + let mut cx = crate::compositor::Context { + editor: &mut self.editor, + jobs: &mut self.jobs, + scroll: None, + }; + + compositor.render(&mut cx); + } } pub async fn event_loop(&mut self) { -- cgit v1.2.3-70-g09d2