Skip to content

Commit

Permalink
Adding test case for #1077.
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones authored and jvshahid committed Feb 17, 2016
1 parent 6df109f commit a9490c0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/xml/test_document_fragment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,18 @@ def test_add_node_to_doc_fragment_segfault
Nokogiri::XML::Comment.new(frag,'moo')
end

def test_issue_1077_parsing_of_frozen_strings
input = <<-EOS
<?xml version="1.0" encoding="utf-8"?>
<library>
<book title="I like turtles"/>
</library>
EOS
input.freeze

Nokogiri::XML::DocumentFragment.parse(input) # assert_nothing_raised
end

if Nokogiri.uses_libxml?
def test_for_libxml_in_context_fragment_parsing_bug_workaround
10.times do
Expand Down

0 comments on commit a9490c0

Please sign in to comment.