tests/test_util_xml.lua
author Kim Alvefur <zash@zash.se>
Wed, 21 Feb 2018 21:02:16 +0100
changeset 8541 3eb4cafb3b64
parent 7244 5e7797822f19
child 7246 6e6eea2124c5
permissions -rw-r--r--
mod_mam: Implement option to enable MAM implicitly when client support is detected (#867)

function parse(parse)
	local x =
[[<x xmlns:a="b">
	<y xmlns:a="c"> <!-- this overwrites 'a' -->
	    <a:z/>
	</y>
	<a:z/> <!-- prefix 'a' is nil here, but should be 'b' -->
</x>
]]
	local stanza = parse(x);
	assert_equal(stanza.tags[2].attr.xmlns, "b");
end