Skip to content

Commit 50c7252

Browse files
Watson1978kou
authored andcommitted
test: add a performance test for %...; in document declaration
1 parent 163d366 commit 50c7252

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/parse/test_document_type_declaration.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,5 +306,12 @@ def test_linear_performance_comment_gt
306306
REXML::Document.new("<!DOCTYPE root [<!-- " + ">" * n + " -->]>")
307307
end
308308
end
309+
310+
def test_linear_performance_external_entity_right_bracket_gt
311+
seq = [10000, 50000, 100000, 150000, 200000]
312+
assert_linear_performance(seq, rehearsal: 10) do |n|
313+
REXML::Document.new("<!DOCTYPE root [%" + "]>" * n + ";]>")
314+
end
315+
end
309316
end
310317
end

0 commit comments

Comments
 (0)