Skip to content

Commit

Permalink
test: add a performance test for %...; in document declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 authored and kou committed Aug 1, 2024
1 parent 163d366 commit 50c7252
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/parse/test_document_type_declaration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,5 +306,12 @@ def test_linear_performance_comment_gt
REXML::Document.new("<!DOCTYPE root [<!-- " + ">" * n + " -->]>")
end
end

def test_linear_performance_external_entity_right_bracket_gt
seq = [10000, 50000, 100000, 150000, 200000]
assert_linear_performance(seq, rehearsal: 10) do |n|
REXML::Document.new("<!DOCTYPE root [%" + "]>" * n + ";]>")
end
end
end
end

0 comments on commit 50c7252

Please sign in to comment.