# HG changeset patch # User Matthew Wild # Date 1521211828 0 # Node ID 282d544d48f485019b0c316452ce97f0b84fa29d # Parent 6e5fbeaca0f4a32e4dab941baa274d3790f44fa9 util.stanza: Add tests ensuring support for unicode in tag/attr names diff -r 6e5fbeaca0f4 -r 282d544d48f4 spec/util_stanza_spec.lua --- a/spec/util_stanza_spec.lua Fri Mar 16 14:24:53 2018 +0000 +++ b/spec/util_stanza_spec.lua Fri Mar 16 14:50:28 2018 +0000 @@ -62,6 +62,12 @@ assert.are.equal(#s1.tags[1], 1); assert.are.equal(s1.tags[1][1].name, "grandchild1"); end); + it("should work with unicode values", function () + local s = st.stanza("Объект", { xmlns = "myxmlns", ["Объект"] = "&" }); + assert.are.equal(s.name, "Объект"); + assert.are.equal(s.attr.xmlns, "myxmlns"); + assert.are.equal(s.attr["Объект"], "&"); + end); end); describe("#message()", function()