on master help sign in
refactor test editor config
commita264faa98d348a13318f9ccbb0d979882a112654 authorSkyler Hawthorne <skyler@dead10ck.com> dateTue 28 Feb 2023, 23:57 (4 years ago) parent1db2529
1 file changed+11−7
helix-term/tests/test/helpers.rs+11−7
helix-term/tests/test/helpers.rs+11−7
@@ -232,15 +232,19 @@ pub fn temp_file_with_contents<S: AsRef<str>>(
232232/// Generates a config with defaults more suitable for integration tests
233233pub fn test_config() -> Config {
234234 merge_keys(Config {
235− editor: helix_view::editor::Config {
236− lsp: LspConfig {
237− enable: false,
238− ..Default::default()
239− },
235+ editor: test_editor_config(),
236+ ..Default::default()
237+ })
238+}
239+
240+pub fn test_editor_config() -> helix_view::editor::Config {
241+ helix_view::editor::Config {
242+ lsp: LspConfig {
243+ enable: false,
240244 ..Default::default()
241245 },
242246 ..Default::default()
243− })
247+ }
244248}
245249
246250/// Replaces all LF chars with the system's appropriate line feed
@@ -282,7 +286,7 @@ impl Default for AppBuilder {
282286 fn default() -> Self {
283287 Self {
284288 args: Args::default(),
285− config: Config::default(),
289+ config: test_config(),
286290 syn_conf: test_syntax_conf(None),
287291 input: None,
288292 }