From d4f24630f3a454a0aecaa17ee2667ad1bce367f5 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 9 Jan 2009 17:36:28 +0000 Subject: Add test for previous commit --- tests/test.lua | 3 ++- tests/test_util_stanza.lua | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/test_util_stanza.lua (limited to 'tests') diff --git a/tests/test.lua b/tests/test.lua index eb209219..bc1e1979 100644 --- a/tests/test.lua +++ b/tests/test.lua @@ -25,7 +25,8 @@ function run_all_tests() dotest "core.stanza_router" dotest "core.s2smanager" dotest "core.configmanager" - + dotest "util.stanza" + dosingletest("test_sasl.lua", "latin1toutf8"); end diff --git a/tests/test_util_stanza.lua b/tests/test_util_stanza.lua new file mode 100644 index 00000000..897dab95 --- /dev/null +++ b/tests/test_util_stanza.lua @@ -0,0 +1,7 @@ + +function deserialize(deserialize, st) + local stanza = st.stanza("message", { a = "a" }); + + local stanza2 = deserialize(st.preserialize(stanza)); + assert_is(stanza2.last_add, "Deserialized stanza is missing last_add for adding child tags"); +end -- cgit v1.2.3