recover a wrong closed tag

This commit is contained in:
mmacia committed 2026-08-28 22:35:11 +00:00
1 parent fd3a74f6d6
commit 958b9db9af
2 files changed
+99 -7

No files matched your search

+8
View File
@@ -91,6 +91,14 @@ defmodule FeedReader.CollectorTest do
FeedReader.parse_binary(xml, max_items: 1)
end
test "does not repair quotes across adjacent XML elements" do
xml =
~s(<rss version="2.0"><channel><title>Example</title><item><source url="">Source</source><category domain="region">News</category></item></channel></rss>)
assert {:ok, %ParseResult{items: [%Item{title: nil}]}} =
FeedReader.parse_binary(xml, max_items: 1, chunk_size: 1)
end
test "rejects invalid chunks and binary arguments" do
assert {:error, :invalid_chunk} =
FeedReader.parse_stream([@xml, 123], max_items: 2)