diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-03-16 14:50:28 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-03-16 14:50:28 +0000 |
commit | b7fd84b6e54273b18362b51c0b8388bea0ddbbbf (patch) | |
tree | 711747a4329a1453acb6335787db2e951e69d132 /spec/util_stanza_spec.lua | |
parent | a65352b35f6c549f8f62f77adabbf2cbcd8460e9 (diff) | |
download | prosody-b7fd84b6e54273b18362b51c0b8388bea0ddbbbf.tar.gz prosody-b7fd84b6e54273b18362b51c0b8388bea0ddbbbf.zip |
util.stanza: Add tests ensuring support for unicode in tag/attr names
Diffstat (limited to 'spec/util_stanza_spec.lua')
-rw-r--r-- | spec/util_stanza_spec.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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() |