From 6da7a893b688dea3920e48c40a393c575ef46ffa Mon Sep 17 00:00:00 2001 From: cbasguti Date: Thu, 1 Jun 2023 17:37:58 +0200 Subject: [PATCH] dev: add test use for the issue #2559 --- test/xml/test_node.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/xml/test_node.rb b/test/xml/test_node.rb index d5c7531284d..5946c7a31f4 100644 --- a/test/xml/test_node.rb +++ b/test/xml/test_node.rb @@ -1342,6 +1342,11 @@ def test_text_node_robustness_gh1426 end end + # issue 2559 + def test_serialize_unparented_node + assert_equal("asdf", Nokogiri::HTML4::Document.parse("
").create_text_node("asdf").to_s) + end + describe "#wrap" do let(:xml) { "
important thing
" } let(:doc) { Nokogiri::XML(xml) }