diff --git a/tests/integration.rs b/tests/integration.rs index 507ddf99..bd5b9bc6 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -742,18 +742,34 @@ fn test_wrap_footnote_with_inline_code() { common::assert_wrapped_list_item(&output, " [^code_note]: ", 2); } +/// Checks that a sequence of footnotes is not altered by wrapping. +/// +/// This regression test ensures that the footnote collection remains +/// unchanged when passed to `process_stream`. +#[test] +fn test_wrap_footnote_collection() { + let input = vec![ + "[^1]: ", + "[^2]: ", + "[^3]: ", + "[^4]: ", + "[^5]: ", + "[^6]: ", + "[^7]: ", + "[^8]: ", + ] + .into_iter() + .map(str::to_string) + .collect::>(); + + let output = process_stream(&input); + assert_eq!(output, input); +} + #[test] /// Verifies that short list items are not wrapped or altered by the stream processing logic. /// /// Ensures that a single-line bullet list item remains unchanged after processing. -/// -/// # Examples -/// -/// ``` -/// let input = vec!["- short item".to_string()]; -/// let output = process_stream(&input); -/// assert_eq!(output, input); -/// ``` fn test_wrap_short_list_item() { let input = vec!["- short item".to_string()]; let output = process_stream(&input);