Skip to content

Commit

Permalink
test(lxp): add test for empty namespace (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske authored Jun 27, 2024
1 parent 8ee20c5 commit 4c406f6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/01-lxp_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ describe("lxp:", function()
default namespace on y
<b>inherited namespace for b</b>
</y>
<z xmlns=''>
empty namespace
</z>
</root>
]]))
p:close()
Expand All @@ -486,6 +489,10 @@ describe("lxp:", function()
{ "EndElement", "b/namespace?b" },
{ "EndElement", "b/namespace?y" },
{ "EndNamespaceDecl", nil },
{ "StartNamespaceDecl", nil }, -- emptynamespace results in no namespace; nil
{ "StartElement", "z", {} },
{ "EndElement", "z" },
{ "EndNamespaceDecl", nil },
{ "EndElement", "root" },
}, cbdata)
end)
Expand All @@ -507,6 +514,9 @@ describe("lxp:", function()
default namespace on y
<b>inherited namespace for b</b>
</y>
<z xmlns=''>
empty namespace
</z>
</root>
]]))
p:close()
Expand All @@ -529,6 +539,10 @@ describe("lxp:", function()
{ "EndElement", "b/namespace?b" },
{ "EndElement", "b/namespace?y" },
{ "EndNamespaceDecl", nil },
{ "StartNamespaceDecl", nil }, -- emptynamespace results in no namespace; nil
{ "StartElement", "z", {} },
{ "EndElement", "z" },
{ "EndNamespaceDecl", nil },
{ "EndElement", "root" },
}, cbdata)
end)
Expand Down

0 comments on commit 4c406f6

Please sign in to comment.