@@ -41,6 +41,7 @@ pub async fn test_key_sequence(
4141 test_key_sequences(app, vec![(in_keys, test_fn)]).await
4242}
4343
44+#[allow(clippy::type_complexity)]
4445pub async fn test_key_sequences(
4546 app: &mut Application,
4647 inputs: Vec<(Option<&str>, Option<&dyn Fn(&Application)>)>,
@@ -51,7 +52,7 @@ pub async fn test_key_sequences(
5152
5253 for (in_keys, test_fn) in inputs {
5354 if let Some(in_keys) = in_keys {
54− for key_event in parse_macro(&in_keys)?.into_iter() {
55+ for key_event in parse_macro(in_keys)?.into_iter() {
5556 tx.send(Ok(Event::Key(KeyEvent::from(key_event))))?;
5657 }
5758 }
@@ -92,7 +93,7 @@ pub async fn test_key_sequence_with_input_text<T: Into<TestCase>>(
9293
9394 // replace the initial text with the input text
9495 doc.apply(
95− &Transaction::change_by_selection(&doc.text(), &sel, |_| {
96+ &Transaction::change_by_selection(doc.text(), &sel, |_| {
9697 (0, doc.text().len_chars(), Some((&test_case.in_text).into()))
9798 })
9899 .with_selection(test_case.in_selection.clone()),
@@ -105,7 +106,7 @@ pub async fn test_key_sequence_with_input_text<T: Into<TestCase>>(
105106/// Use this for very simple test cases where there is one input
106107/// document, selection, and sequence of key presses, and you just
107108/// want to verify the resulting document and selection.
108−pub async fn test_key_sequence_text_result<T: Into<TestCase>>(
109+pub async fn test_with_config<T: Into<TestCase>>(
109110 args: Args,
110111 config: Config,
111112 test_case: T,
@@ -126,6 +127,10 @@ pub async fn test_key_sequence_text_result<T: Into<TestCase>>(
126127 .await
127128}
128129
130+pub async fn test<T: Into<TestCase>>(test_case: T) -> anyhow::Result<()> {
131+ test_with_config(Args::default(), Config::default(), test_case).await
132+}
133+
129134pub fn temp_file_with_contents<S: AsRef<str>>(
130135 content: S,
131136) -> anyhow::Result<tempfile::NamedTempFile> {
@@ -148,7 +153,7 @@ pub fn platform_line(input: &str) -> String {
148153
149154 // we can assume that the source files in this code base will always
150155 // be LF, so indoc strings will always insert LF
151− let mut output = input.replace("\n", line_end);
156+ let mut output = input.replace('\n', line_end);
152157
153158 if !output.ends_with(line_end) {
154159 output.push_str(line_end);