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 | 6d97f869e8dc7c148b5cc196f3e83ebc9bf72ca0 (patch) | |
tree | 711747a4329a1453acb6335787db2e951e69d132 | |
parent | bbc5d5a638f4a52af1382ddd271e8414c5df126d (diff) | |
download | prosody-6d97f869e8dc7c148b5cc196f3e83ebc9bf72ca0.tar.gz prosody-6d97f869e8dc7c148b5cc196f3e83ebc9bf72ca0.zip |
util.stanza: Add tests ensuring support for unicode in tag/attr names
-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() |