Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevecheckoway committed Jan 16, 2024
1 parent de6bcd2 commit 4d1a082
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_memory_usage.rb
Expand Up @@ -301,5 +301,17 @@ def start_element(name, attrs = [])
Nokogiri::HTML5::Document.parse(html)
end
end

it "libgumbo max depth exceeded" do
html = '<html><body>'

memwatch(__method__) do
begin
Nokogiri::HTML5.parse(html, max_tree_depth: 1)
rescue ArgumentError
end
end
end

end if ENV["NOKOGIRI_MEMORY_SUITE"] && Nokogiri.uses_libxml?
end

0 comments on commit 4d1a082

Please sign in to comment.