aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_stanza_spec.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-03-16 14:50:28 +0000
committerMatthew Wild <mwild1@gmail.com>2018-03-16 14:50:28 +0000
commitb7fd84b6e54273b18362b51c0b8388bea0ddbbbf (patch)
tree711747a4329a1453acb6335787db2e951e69d132 /spec/util_stanza_spec.lua
parenta65352b35f6c549f8f62f77adabbf2cbcd8460e9 (diff)
downloadprosody-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.lua6
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()