From b7fd84b6e54273b18362b51c0b8388bea0ddbbbf Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 16 Mar 2018 14:50:28 +0000 Subject: util.stanza: Add tests ensuring support for unicode in tag/attr names --- spec/util_stanza_spec.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec') diff --git a/spec/util_stanza_spec.lua b/spec/util_stanza_spec.lua index d8e4ba71..7543ffe7 100644 --- a/spec/util_stanza_spec.lua +++ b/spec/util_stanza_spec.lua @@ -62,6 +62,12 @@ describe("util.stanza", function() 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() -- cgit v1.2.3