spec/util_xml_spec.lua
changeset 12274 c78639ee6ccb
parent 12184 53e0ae770917
--- a/spec/util_xml_spec.lua	Fri Feb 04 20:11:18 2022 +0100
+++ b/spec/util_xml_spec.lua	Fri Feb 04 20:47:39 2022 +0100
@@ -42,6 +42,13 @@
 			assert.falsy(ok);
 		end);
 
+		it("should allow processing instructions if asked nicely", function()
+			local x = "<?xml-stylesheet href='make-fancy.xsl'?><foo/>";
+			local stanza = xml.parse(x, {allow_processing_instructions = true});
+			assert.truthy(stanza);
+			assert.are.equal(stanza.name, "foo");
+		end);
+
 		it("should allow an xml declaration", function()
 			local x = "<?xml version='1.0'?><foo/>";
 			local stanza = xml.parse(x);