Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test case checking decoration of empty NodeSet, which fails on JRuby #1319

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/xml/test_document_fragment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ def awesome!
assert fragment.children.respond_to?(:awesome!), fragment.children.class
end

def test_decorator_is_applied_to_empty_set
x = Module.new do
def awesome!
end
end
util_decorate(@xml, x)
fragment = Nokogiri::XML::DocumentFragment.new(@xml, "")
assert fragment.children.respond_to?(:awesome!), fragment.children.class
end

def test_add_node_to_doc_fragment_segfault
frag = Nokogiri::XML::DocumentFragment.new(@xml, '<p>hello world</p>')
Nokogiri::XML::Comment.new(frag,'moo')
Expand Down