Software /
code /
prosody
Changeset
8598:282d544d48f4
util.stanza: Add tests ensuring support for unicode in tag/attr names
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 16 Mar 2018 14:50:28 +0000 |
parents | 8597:6e5fbeaca0f4 |
children | 8599:62bfc85a53c8 |
files | spec/util_stanza_spec.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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()